Validate Binary Search Tree - LeetCode 98 - JavaScript

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


A step by step guide of solving the popular Amazon coding interview question.

LeetCode Question 98

JavaScript

0:00 Intro
0:27 Explanation
3:18 Code

#softwareengineering #leetcode #javascript
Рекомендации по теме
Комментарии
Автор

Wow, clearest explanation i've seen. Then i noticed your blind 75 list. you got yourself a subscriber, keep it up!

wabbit
Автор

Ive seen some truly awful solutions for this one, this is absolutely fantastic and by far the best solution

Adam-tzgk
Автор

I wouldn't say it's obvious how to compare root to itself. I learned a lot from this tree and backtracking series. Thanks

katielamber
Автор

Thank you so much! This really helped me a lot and clear explanation!

kyledeato
Автор

Can't we just do a DFS traversal and at each node, check if the left is less and if the right is greater? (if left and right are present, of course)

brianspinos