bsc

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

root / semester_2 / algorithms / algo_007.md

algo_007.md (384B)


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