Validate Binary Search Tree - LeetCode 98 - Coding Interview Questions

preview_player
Показать описание
Validate Binary Search Tree - Depth First Search - LeetCode 98

In this Video i will show you how to solve the problem Validate Binary Search Tree using depth first search technique.
This question is asked a lot during coding interviews for big companies like google, uber...

If you find this video helpful, subscribe, like, comment...
Thanks.
#codinginterview #leetcodesolution #leetcode

Intro : (0:00)
What is Binary Search Tree ? : (0:10)
Visualization For the Solution : (0:21)
Code Explanation : (2:29)
Complexity Analysis : (3:38)
Рекомендации по теме
Комментарии
Автор

Hello, can you explain why we check if root <= prevN? you said in the video that b/c stack uses LIFO(last in first out) that we can use that to our advantage by checking for root <= prevN. Sorry Im very new to this so I'm trying too understand the reason behind every step

Brosales