Skip to content

Latest commit

 

History

History

11. Binary Search Tree

Binary Search Tree

  1. Closest Node to given Node Problem.
    Question
    Solution
    Command:-

    $ go run 1.closest-node-to-k-solution.go
    Method TimeComplexity SpaceComplexity Source
    Iterative O(h)
    where h is height of tree
    O(1) Link
    Recursive O(h)
    where h is height of tree
    O(N) Link
  2. Build a BST of Min Height for given Sorted Array Problem.
    Question
    Solution
    Command:-

    $ go run 2.sorted-array-to-self-balance-bst-solution.go
    Method TimeComplexity SpaceComplexity Source
    Recursive O(N) O(1) Link