bsc

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

root / semester_2 / algorithms / algo_016.md

algo_016.md (402B)


      1 # algo_016
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to traverse or display a circular linked list.
      6 
      7 ## Algorithm
      8 ```
      9 procedure display(cl)
     10 begin
     11     if(cl = NULL)
     12         write("The list is empty.");
     13     else
     14         ptr ← next(cl); //Points to the first node.
     15         do{
     16             write(info(ptr));
     17             ptr ← next(ptr);
     18         } while(ptr ≠ next(cl));
     19     endif
     20 end procedure
     21 ```
© 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