Push operation top = top +1 - Data Structure - Stack Growing

Q.  What does the push operation top = top +1 indicate while representing the stack in one - dimensional array?
- Published on 27 Aug 15

a. Stack Growing
b. Stack Shrinking
c. Stack Stability
d. Stack Instability

ANSWER: Stack Growing
 

    Discussion

  • Nirja Shah   -Posted on 18 Nov 15
    In stack terminology push operation means you are inserting item in the stack. So top=top+1 condition indicates that stack is growing, while representing the stack in one - dimensional array.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)