bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_2 / algorithms / algo_029.md

algo_029.md (337B)


      1 # algo_029
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to pop a element from stack.
      6 
      7 ## Algorithm
      8 ```
      9 procedure pop(stack[], top, n)
     10 begin
     11     if(top = -1) 
     12         write("Stack is empty, deletion not possible.");
     13         return;
     14     else
     15         x ← stack[top];
     16         top ← top - 1;
     17         return x;
     18     endif;
     19 end procedure
     20 ```
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror