We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 22: Binary Search Trees
Day 22: Binary Search Trees
Sort by
recency
|
489 Discussions
|
Please Login in order to post a comment
Javascript code:
Don't understand how the output get 2 with the below input. Any expert can help to shed some light please. Thanks!
9 20 50 35 44 9 15 62 11 13
Python 3 solution
python def getHeight(self,root):
This is what I came up with:
Using Python 3’s pattern-matching: