bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_2 / algorithms / algo_055.md

algo_055.md (296B)


      1 # algo_055
      2 
      3 ### Problem Statement
      4 
      5 > Write a recursive algorithm to find the maximum element from a Binary Search Tree (BST).
      6 
      7 ## Algorithm
      8 ```
      9 procedure findMax(T)
     10 begin
     11     if (T = NULL or RC(T) = NULL) then
     12         return T;
     13     else
     14         return findMax(RC(T));
     15     endif
     16 end procedure
     17 ```