• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
September 21, 2022 |74.1K Views
Delete Node Operation in Binary Search Tree (BST)
  Share  7 Likes
Description
Discussion

We have discussed BST search and insert operations. In this post, the delete operation is discussed. When we delete a node, three possibilities arise. 
1) Node to be deleted is the leaf: Simply remove from the tree.

             50                            50
          /     \         delete(20)      /   \
         30      70       --------->    30     70 
        /  \    /  \                     \    /  \ 
      20   40  60   80                   40  60   80

Delete Node Operation in Binary Search Tree (BST) : https://www.geeksforgeeks.org/binary-search-tree-set-2-delete/

Read More