

InterviewSolution
Saved Bookmarks
1. |
Write the algorithm for push operation (to add elements) in an array based stack. |
Answer» Step 1: Start Step 2: if top >= capacity then OVERFLOW, Exit Step 3: top = top+1 Step 4: Stack [top] = value Step 5: Stop |
|