bsc

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

root / semester_2 / algorithms / algo_041.md

algo_041.md (491B)


      1 # algo_041
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to dequeue an element from a linear queue using linked representation.
      6 
      7 ## Algorithm
      8 ```
      9 procedure dequeue(front, rear)
     10 begin
     11     if (front = NULL and rear = NULL) then
     12         write("Queue empty, deletion not possible.");
     13     else if (front = rear) then
     14         delete(front);
     15         front ← NULL;
     16         rear ← NULL;
     17     else
     18         ptr ← front;
     19         front ← next(ptr);
     20         delete(ptr);
     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