bsc

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

root / semester_2 / algorithms / algo_059.md

algo_059.md (353B)


      1 # algo_059
      2 
      3 ### Problem Statement
      4 
      5 > Write an algorithm to find the inorder successor of a node in a Binary Search Tree (BST).
      6 
      7 ## Algorithm
      8 ```
      9 procedure inorderSuccessor(ptr)
     10 begin
     11     /* Finds the leftmost node of the right subtree */
     12     p ← RC(ptr);
     13     while (LC(p) ≠ NULL) do
     14         p ← LC(p);
     15     endwhile
     16     return p;
     17 end procedure
     18 ```
© 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