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

Wednesday, March 10th, 2010  »  Posted By Ranjith  »  Total 2 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 Ranjith  »  Total 6 Comments

class Dictionary
{
public:
int index;

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

Java program that implements stack ADT

Friday, October 2nd, 2009  »  Posted By Ranjith  »  Total 0 Comment

public stack(int s)
{
size=s>0?s:10;
top=-1;
elements=(E[])new Object[size];
}

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

Free email signup