bsc

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

root / semester_2 / algorithms / algo_054.md

algo_054.md (379B)


      1 # algo_054
      2 
      3 ### Problem Statement
      4 
      5 > Write a non-recursive algorithm to find the minimum element from a Binary Search Tree (BST).
      6 
      7 ## Algorithm
      8 ```
      9 procedure findMin(T)
     10 begin
     11     ptr ← T;
     12     if (ptr = NULL) then
     13         return -1;
     14     else
     15         while (LC(ptr) ≠ NULL) do
     16             ptr ← LC(ptr);
     17         endwhile
     18         return INFO(ptr);
     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