Google Ads

Sunday, September 13, 2009

Stack using Arrays

Representation of Stack using Arrays
Algorithm:


Step 1: Create a push operation with one argument, the element to be added

Step 2: Create a POP function with one argument, the address of the element to store the popped operation

Step 3: Create a function PEEK with one argument, the address of the element of store the top value

Step 4: Create a function ISEMPTY with no argument for stack empty condition

Step 5: Create a function ISFULL for checking for stack full.

Step 6: Sop the program execution

No comments:

Post a Comment