bsc

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

root / semester_2 / algorithms / algo_028.md

algo_028.md (308B)


      1 # algo_028
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to push a element to stack.
      6 
      7 ## Algorithm
      8 ```
      9 procedure push(stack[], top, n, val)
     10 begin
     11     if(top = n - 1)
     12         write("Stack full, insertion not possible.");
     13     else
     14         top ← top + 1;
     15         stack[top] ← val;
     16     endif
     17 end procedure
     18 ```
© 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