HackerRank Day 22 Binary Search Trees | Python

preview_player
Показать описание
In this series, I will walk you through Hacker Rank’s 30 days of code challenge day by day.

In Day 22, we will learn about Binary Search Trees in Python.

Please fill out this survey to help give me feedback on how to improve the channel.

Try solving it yourself!

View my solution for Day 22 at

Join our LinkedIn Group to ask questions and learn from others.

Support me on Patreon!

#otsc #BinarySearchTree #HackerRank
Рекомендации по теме
Комментарии
Автор

Hi,

can you please explain how the increment is happening for the height when called recursively

pranavisai
Автор

I got confused where he says the edges on the right is 2 and that on the left is 1. How come? If the nodes on the right are 4 and the edges are 3, how then do they become 2 with the need to add an extra 1? I also don't get how left_height and right_height implements

_yomiadebowale
Автор

Is it ok that I look at the solutions it is always something new even after research it is still blurry, and i don't fully understand until i see your videos

nedjmeddine
Автор

how would you get the height by calling left_height and right_height recursively ?

manjeetshrestha
Автор

can we do this:
if not root:
return -1
else:
return max(self.getHeight(root.right), self.getHeight(root.left)) + 1

wx
welcome to shbcf.ru