A

@anmoll

second greatest element in array

C++
1 day ago
#include <bits/stdc++.h> using namespace std; int main () { int arr[] = {7, 2, 8, 5, 8, 2, 1, 3, 5}; int n = 9; int greatest = -100; int secondgreatest = -100;

iterators reverse array

C++
1 day ago
#include <iostream> #include <vector> using namespace std; int main() { vector<int> arr = {1, 2, 3, 4, 5}; // A normal for loop using reverse iterators // auto automatically deduces the type: vector<int>::reverse_iterator

basic reverse array

C++
1 day ago
#include <iostream> #include <vector> using namespace std; int main() { int n; cout << "Enter the number of elements: "; cin >> n;

print name n times

C++
1 day ago
#include <iostream> #include <bits/stdc++.h> using namespace std; class solution{ public: void nameprint(string name, int count , int n) {

sum of array

C++
2 days ago
#include <bits/stdc++.h> using namespace std; class solution{ public: int arraySum(int arr[], int n){ //Write your code here... int s=0; for(int i = 0; i < n; i++) { s = arr[i] + s;

greatest common divisor

C++
2 days ago
#include <iostream> #include <algorithm> using namespace std; class sol{ public:

palindrome reverse check

C++
2 days ago
#include<bits/stdc++.h> using namespace std; class Solution { public: bool isPalindrome(int x) { long long revnum = 0; int dup = x; while(x>0){

asg 07 n-queen

C++
1 year ago
#include<iostream> #include<cmath> using namespace std; class NQueen { public: int x[10]; int n; int count=0; bool Place(int k, int col)

asg 06 knapsack 01

C++
1 year ago
#include<iostream> using namespace std; class object { int weight; int profit; friend class knapsack; };

asg 05 hashing

C++
1 year ago
#include <iostream> using namespace std; #define MAX 10 class record { int rollno, marks; friend class student; };

asg 04 avl char

C++
1 year ago
//anmol tiwari roll no. 11 #include <iostream> using namespace std; class avl_node { public: char data; // Change data type to char avl_node *left; avl_node *right;

asg 04 avl int

C++
1 year ago
// Anmol Tiwari // Panel j // PRN 1032233432 #include <iostream> using namespace std; class avl_node { public: int data;

asg 03 prims algo

C++
1 year ago
// Anmol tiwari roll no. 11 panel j // to add switch case (create menu driven program) #include <iostream> #define max 20 using namespace std; class graph { int cost[max][max];

asg 02 bfs dfs

C++
1 year ago
#include <bits/stdc++.h> using namespace std; class gnode { int id; string name; gnode *next; public: gnode() {

asg 01 linear binary and sorts

C++
1 year ago
#include <stdio.h> #include <iostream> using namespace std; class user { private: string name; long int contact; float bill_amt;

asg 03 c++

C++
1 year ago
#include <iostream> #include <string> using namespace std; // Base class class Employee { protected: string Ename; int EmpID;

ass 09

C++
2 years ago
#include<stdio.h> int main() { FILE *fsrc,*fdst; char ch; fsrc=fopen("test.txt","r"); fdst=fopen("test_dst.txt","w"); /*while((ch=getc(fp))!=EOF)

book

C
2 years ago
#include<stdio.h> struct book{ int p,e; char a[20],t[20]; }b1; void main(){ printf("enter price and edition of book\n"); scanf("%d %d", &b1.p, &b1.e);

astrek

C
2 years ago
#include<stdio.h> void swap(int *a,int *b); int main() { int a,b,temp; printf("enter value of a"); scanf("%d", &a); printf("enter value of b");

assgn 08

C
2 years ago
#include<stdio.h> int swap(int a,int b); int main() {int a,b; printf("enter value of a"); scanf("%d", a); printf("enter value of b"); scanf("%d", b);