gumgum's Garden🌼

Find Min and Max in a BST

To find minimum and maximum in a BST, if can follow the properties of BST. In a BST, left subtree's value is less then root node, and right subtree's value is greater than root node.

Hence,

  • Going to left most node will give us the minimum node
  • Going to right most node will give us the maximum node