Saturday, December 29, 2018
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class B_Tree;
class Node
{
private:
int Info;
Node *Left, *Right;
friend class B_Tree;
};
class B_Tree
{
private:
Node *Root;
public:
B_Tree()
{
Root = NULL;
}
...
PROGRAM TO COUNT SUM OF ALL NODES using RECURSION.
7:26 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class B_Tree;
class Node
{
private:
int Info;
Node *Left, *Right;
friend class B_Tree;
};
class B_Tree
{
private:
Node *Root;
public:
B_Tree()
{
Root = NULL;
}
...
PROGRAM FOR SORTING ARRAY USING QUICK SORT.
7:22 PM Unknown
#include <iostream>
#include <conio.h>
using namespace std;
class Array
{
private:
int *Arr, Size, Right;
public:
Array(int Siz)
{
Arr = new int[Siz];
for (int I = 0; I <Siz; I++)
Arr[I] = 0;
Right = 0;
Size = Siz;
}
void Input()
{
int No;
cout << "Enter Size Of Array: ";
cin >> No;
Right = No;
cout << "\nEnter Elements Of Array:...
PROGRAM FOR SORTING ARRAY USING MERGE SORT.
7:20 PM Unknown
#include <iostream>
#include <conio.h>
using namespace std;
class Array
{
private:
int *Arr, Size, Right;
public:
Array(int Siz)
{
Arr = new int[Siz];
for (int I = 0; I <Siz; I++)
{
Arr[I] = 0;
}
Right = 0;
Size = Siz;
}
void Input()
{
int No;
cout << "Enter Size Of Array: ";
cin >> No;
Right = No;
cout << "\nEnter Elements...
Saturday, December 1, 2018
PROGRAM TO IMPLEMENT INORDER TRAVERSAL using STACK.
4:09 PM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Node;
class B_Tree;
template <class Type>
class Stack
{
private:
Type *Arr;
int Top, Size;
public:
Stack(int Siz)
{
Size = Siz;
Arr = new Type[Size];
for (int I = 0; I <Size; I++)
{
Arr[I] = 0;
}
Top = -1;
}
void Push(Type Num)
{
if (Top == Size - 1)
...
Friday, November 30, 2018
PROGRAM TO IMPLEMENT THE TREE TRAVERSELS.
1:16 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class B_Tree;
class Node
{
private:
int Info;
Node *Left, *Right;
friend class B_Tree;
};
class B_Tree
{
private:
Node *Root;
public:
B_Tree()
{
Root = NULL;
}
...
PROGRAM TO IMPLEMENT THE DOUBLY LINKLIST.
1:13 PM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Double_LL;
class Node
{
private:
int Info;
Node *Left, *Right;
friend class Double_LL;
};
class Double_LL
{
private:
Node *First;
public:
Double_LL()
{
First = NULL;
...
PROGRAM TO IMPLEMENT THE JOSEPHUS PROBLEM.
1:11 PM Unknown
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
using namespace std;
class C_List;
class Node
{
friend class C_List;
friend class Josephus;
private:
char Name[100];
Node *Link;
};
class Josephus;
class C_List
{
friend class Josephus;
private:
Node *Last;
public:
...
PROGRAM TO IMPLEMENT STACK USING CIRCULAR LIST.
1:09 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Stack;
class Node
{
private:
int Info;
Node *Link;
friend class Stack;
};
class Stack
{
private:
Node *Last;
public:
Stack()
{
Last = NULL;
}
void Push(int Value)
{
Node *Temp = new Node;
Temp->Info = Value;
if (IsEmpty())
Last = Temp;
else
Temp->Link =...
PROGRAM TO IMPLEMENT QUEUE USING CIRCULAR LIST.
1:08 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Queue;
class Node
{
private:
int Info;
Node *Link;
friend class Queue;
};
class Queue
{
private:
Node *Last;
public:
Queue()
{
Last = NULL;
}
void EnQueue(int Value)
{
Node *Temp = new Node;
Temp->Info = Value;
if (IsEmpty())
Last = Temp;
else
Temp->Link...
PROGRAM TO IMPLEMENT CIRCULAR LISTS(function del after).
1:07 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class C_List;
class Node
{
private:
int Info;
Node *Link;
friend class C_List;
};
class C_List
{
private:
Node *Last;
public:
C_List()
{
Last = NULL;
}
void Insert(int Value)
{
Node *Temp = new Node;
Temp->Info = Value;
if (IsEmpty())
Last = Temp;
else
Temp->Link...
PROGRAM TO IMPLEMENT CIRCULAR LIST.
1:02 PM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class C_List;
class Node
{
private:
int Info;
Node *Link;
friend class C_List;
};
class C_List
{
private:
Node *Last;
public:
C_List()
{
Last = NULL;
}
void Insert(int Value)
{
Node *Temp = new Node;
Temp->Info = Value;
if (IsEmpty())
Last = Temp;
else
Temp->Link...
Monday, November 12, 2018
PROGRAM TO CONCATENATE TWO LISTS TO 3rd
9:17 AM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Chain;
class Node
{
private:
int Info;
Node *Link;
friend class Chain;
};
class Chain
{
private:
Node *First;
public:
Chain()
{
First = NULL;
}
void...
PROGRAM INSERT A NODE AT END OF LINK LIST.
9:16 AM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Chain;
class Node
{
private:
int Info;
Node *Link;
friend class Chain;
};
class Chain
{
private:
Node *First;
public:
Chain()
{
First = NULL;
}
void...
PROGRAM TO MERGE TWO LISTS.
9:15 AM Unknown
#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
class Chain;
class Node
{
private:
int Info;
Node *Link;
friend class Chain;
};
class Chain
{
private:
Node *First;
public:
Chain()
{
First = NULL;
}
void...
Friday, October 26, 2018
PROGRAM TO FIND NUMBER AND IT'S OCCURRENCES USING LINK LIST.
9:45 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int Value)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
PROGRAM FOR SEARCHING IN LINK LIST.
9:43 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int No)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
LINKED LISTS TO PRINT ELEMENTS IN REVERSE ORDER USING RECURSION.
9:42 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int Value)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
PROGRAM FOR THE LINKED LISTS TO COUNT EVEN NODES.
9:40 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int Value)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
PROGRAM FOR THE LINKED LISTS TO COUNT NODES.
9:39 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int Value)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
PROGRAM FOR THE LINKED LISTS.
9:36 AM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
class Chain;
template <class Type>
class Node
{
private:
Type Info;
Node<int> *Link;
friend class Chain;
};
class Chain
{
private:
Node<int> *First;
public:
Chain()
{
First = NULL;
}
void Head_Insert(int Value)
{
Node<int> *Temp = new Node<int>;
Temp->Info...
Sunday, October 21, 2018
CHECK WHETHER STRING IS PALINDROME USING STACK.
12:55 PM Unknown
#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
using namespace std;
template <class Type>
class Palindrom
{
private:
int Top, Size;
Type *Arr;
public:
Palindrom(int Siz)
{
Top = -1;
Size = Siz;
Arr = new Type[Size];
strcpy(Arr, "\0");
}
void Push(Type Ch)
{
if(Top == Size-1)
{
cout << "\nStack...
CHECK BRACKETS OF EXPRESSION ARE BALANCED or NOT using STACK.
12:54 PM Unknown
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
using namespace std;
template <class Type>
class Brackets
{
private:
Type *Stack, *String;
bool Valid;
int Size, Top;
public:
Brackets(int Siz)
{
Size = Siz;
Stack = new Type[Size];
strcpy(Stack, "\0");
Valid = true;
Top = -1;
}
void Push(Type Ch)
{
if (Top == Size...
Subscribe to:
Posts (Atom)