bsc

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

root / semester_2 / algorithms / algo_035.md

algo_035.md (444B)


      1 # algo_035
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to dequeue.
      6 
      7 ## Algorithm
      8 ```
      9 procedure dequeue(Q[], front, rear)
     10 begin
     11     if(front = -1 || front > rear)
     12         write("Queue empty, deletion can't be performed.");
     13     else
     14         val ← Q[front];
     15         write("Deleted element", val);
     16         front ← front + 1;
     17         if(front > rear)
     18             front ← -1;
     19             rear ← -1;
     20         endif 
     21     endif
     22 end procedure
     23 ```
© 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