C++ programs to implement the Queue ADT using an array

Wednesday, March 10th, 2010  »  Posted By  »  Total 1 Comment

/* Write C++ programs to implement the Queue ADT using an array */ #include<iostream> #include<conio.h> #include<stdlib.h> using namespace std;   class queue { int queue1[5]; int rear,front; public: queue() { rear=-1; front=-1; } void insert(int x) { if(rear > 4) { cout <<"queue over flow"; front=rear=-1; return; } queue1[++rear]=x; cout <<"inserted" <<x; } void delet() [...]

C++ programs to implement the Stack ADT using an array

Wednesday, March 10th, 2010  »  Posted By  »  Total 4 Comments

void push(int x)
{
if(top > 4)
{
cout <<“stack over flow”;
return;
}
stk[++top]=x;
cout <<“inserted” < }

C++ program to implement all the functions of a dictionary (ADT) using hashing

Wednesday, March 10th, 2010  »  Posted By  »  Total 7 Comments

class Dictionary
{
public:
int index;

Dictionary();
void insert(int);
void search(int);
void delete_ele(int);
};

C++ program to implement the double ended queue using a double linked list

Wednesday, March 10th, 2010  »  Posted By  »  Total 1 Comment

class node
{
public:
int data;
class node *next;
class node *prev;
};

C++ program to perform Insert, Delete, Search an element into a binary search tree

Wednesday, March 10th, 2010  »  Posted By  »  Total 3 Comments

/* Write a C++ program to perform the following operations:
a) Insert an element into a binary search tree.
b) Delete an element from a binary search tree.
c) Search for a key element in a binary search tree. */

C++ program to perform Insertion and Deletion operations on AVL-trees

Wednesday, March 10th, 2010  »  Posted By  »  Total 6 Comments

void AVL::display(AVLNODE *temp)
{
if(temp==NULL)
return;
cout<data<<" ";
display(temp->left);
display(temp->right);
}

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup