The document outlines a simple algorithm for pushing an item onto a stack represented by an array. It initializes an empty array and checks if the stack is full before adding the new item. If the stack is full, it prints a message indicating that the stack is full.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
Stack
The document outlines a simple algorithm for pushing an item onto a stack represented by an array. It initializes an empty array and checks if the stack is full before adding the new item. If the stack is full, it prints a message indicating that the stack is full.