Delete Node in a BST | LeetCode 952 | C++, Java, Python

preview_player
Показать описание

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

August LeetCoding Challenge | Problem 31 | Delete Node in a BST | 31 August,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Delete Node in a BST,
Delete Node in a BST c++,
Delete Node in a BST Java,
Delete Node in a BST python,
Delete Node in a BST solution,
450. Delete Node in a BST,

#CodingInterview #LeetCode #AugustCodingChallenge #Google #Amazon #bst #Trees #BinaryTree
Рекомендации по теме
Комментарии
Автор

After seeing the way you explained, I have subscribed with love

saranguru
Автор

Thank you very much.. Superb explanation

sharifmansuri
Автор

Thanks so much. This is a really hard problem. It is always the hard part to delete something in a tree. Your explanation was amazing. I hope you can fullfill your dream and someday work in Google.

ChristianESL
Автор

Very well explained! Thank you for making it so easier.

shaziakaleem
Автор

The given BST is incorrect as 9 should be placed right of 8 not in the left. If we take inorder of the given BST, it won’t be in ascending order.
Inorder: 4, 7, 9, 8, 10, 12
Which is incorrect

gauravchandel
Автор

If we need to balance the tree after deletion . How can we do it??

ragavkishoreg
Автор

Hi, don't you think the given BST in the example is wrong. 8 should be in place of 7 and 7, 4 should be left of 8?

rohithchandra
Автор

NOTE : LEFT SUBTREE OF node 8 is 9, how ?? @Knowledge Center

The example you discussed in the whole video even is not a BST. It might be a mistake, I noticed & hence informing. Hope it helps other students to not get a misconception about the properties of BST.

Binary Search Tree is a node-based binary tree data structure that has the following properties:

The left subtree of a node contains only nodes with keys lesser than the node’s key.
The right subtree of a node contains only nodes with keys greater than the node’s key.
The left and right subtree each must also be a binary search tree.

rahuljain
Автор

sir which software you use for writing .

himanshupatel