Hi, thanks for this video! I think the second question’s solution from the candidate fails for any increasing or decreasing sequence longer than 2 elements. Thanks again! Massimo.
Remember that for each level of the tree there are max 2^level items and they’d have to be defined as a value or null. So for [1,2,3,4,5,6,Null, Null, Null, Null….] you have the root as 1, it’s left as 2 it’s right as 3. Then 2’s left if 4, it’s right is 5, and so on. You’re right it’s uncommon but it is possible to have this representation so never hurts to spend 5 seconds clarifying
I wish this is how my mock interview was...
Thanks alot for this video, it's really helpful to see how an interview goes and hear the feedback. I appreciate all your work.
Had me screaming binary search on question 2 haha
Hi, thanks for this video! I think the second question’s solution from the candidate fails for any increasing or decreasing sequence longer than 2 elements. Thanks again! Massimo.
Super helpful and insightful. thank you so much
Hi, I have a phone interview coming up and this was really helpful. Thank you for the video !!!
Leetcode doesn't provide binary trees as lists how would we deal with that vs the node setup?
Remember that for each level of the tree there are max 2^level items and they’d have to be defined as a value or null. So for [1,2,3,4,5,6,Null, Null, Null, Null….] you have the root as 1, it’s left as 2 it’s right as 3. Then 2’s left if 4, it’s right is 5, and so on.
You’re right it’s uncommon but it is possible to have this representation so never hurts to spend 5 seconds clarifying
can I also have a mock interview?