bsc

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

algo_020.md (431B)


      1 # algo_020
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to search an element on a circular linked list.
      6 
      7 ## Algorithm
      8 ```
      9 procedure search(cl, key)
     10 begin
     11     found ← 0;
     12     if(cl)
     13         ptr ← next(cl);
     14         do
     15             if(key = info(ptr))
     16                 found ← 1;
     17                 break;
     18             endif
     19             ptr ← next(ptr);
     20         while(ptr ≠ next(cl));
     21     endif
     22     return(found);
     23 end procedure
     24 ```
© 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