bsc

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

algo_019.md (357B)


      1 # algo_019
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to count the number of nodes in circular list.
      6 
      7 ## Algorithm
      8 ```
      9 procedure count(cl)
     10 begin
     11     count ← 0;
     12     if(cl)
     13         ptr ← next(cl);
     14         do 
     15             count ← count + 1;
     16             ptr ← next(ptr);
     17         while (ptr ≠ next(cl));
     18     endif
     19     return(count);
     20 end procedure
     21 ```
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror