/* 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() [...]
void push(int x)
{
if(top > 4)
{
cout <<“stack over flow”;
return;
}
stk[++top]=x;
cout <<“inserted” <
class Dictionary
{
public:
int index;
Dictionary();
void insert(int);
void search(int);
void delete_ele(int);
};
class node
{
public:
int data;
class node *next;
class node *prev;
};
/* 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. */
void AVL::display(AVLNODE *temp)
{
if(temp==NULL)
return;
cout<
display(temp->left);
display(temp->right);
}
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya