bsc

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

root / semester_2 / algorithms / algo_043.md

algo_043.md (466B)


      1 # algo_043
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to dequeue an element from a circular queue using linked representation.
      6 
      7 ## Algorithm
      8 ```
      9 procedure dequeue(cq)
     10 begin
     11     if (cq = NULL) then
     12         write("Deletion not possible");
     13     else if (next(cq) = cq) then
     14         ptr ← cq;
     15         cq ← NULL;
     16         delete(ptr);
     17     else
     18         ptr ← next(cq);
     19         next(cq) ← next(ptr);
     20         delete(ptr);
     21     endif
     22     return(cq);
     23 end procedure
     24 ```
© 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