Validate Binary Search Tree (LeetCode 98) | Full solution with animations and visuals

  Рет қаралды 5,419

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Actual Problem: leetcode.com/problems/validat...
Chapters:
00:00 - Intro
01:02 - Problem Statement and Description
03:29 - A level order traversal won't work
06:06 - Different tree traversals
10:07 - Using in-order traversal
12:29 - Dry-run of Code
15:27 - Final Thoughts
📚 Links to topics I talk about in the video:
Level Order Traversal: • Level order traversal ...
Pre-order Traversal: • Pre-order traversal of...
Post-order Traversal: • Post-order traversal o...
In-order Traversal: • Pre-order traversal of...
Binary Tree: • Binary Trees Introduct...
Binary Search Tree: • What is a Binary Searc...
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
Test-cases on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/36pU0JO
Favorite book to understand algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3pAqh8O
Microphone: amzn.to/2MCX7qU
Recording Camera: amzn.to/3alg9Ky
Tablet to sketch and draw: amzn.to/3pM6Bi4
Surface Pen: amzn.to/3pv6tTs
Laptop to edit videos: amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#leetcode #programming #interview

Пікірлер: 30
@leonelmessi3010
@leonelmessi3010 2 ай бұрын
It doesn't matter how long the video is... Clarity is the key to understand and you have it in your videos. Keep it up!
@nikoo28
@nikoo28 2 ай бұрын
i know...sometimes the video gets a little long
@ghanashrim2839
@ghanashrim2839 Жыл бұрын
Every time I search for a problem explanation on youtube, I have this immediate sigh of relief, if your video shows up 😁
@knowingly-unknown0
@knowingly-unknown0 5 ай бұрын
Great aproach Nikhil, you are a saviour
@sahilanand2360
@sahilanand2360 5 күн бұрын
I code in cpp, and your solutions are in java, it turns out to be pretty productive for me because i cannot copy it directly and had to use my own brains for the sake of doing the problem hehe...love your videos
@everyontech2716
@everyontech2716 Жыл бұрын
this is what i was looking for. The video has explanation of 12 min and 4 min on coding part. Very few youtubers does this. I like your approach. Thank you
@nikoo28
@nikoo28 Жыл бұрын
Glad you liked it!
@sysybaba420
@sysybaba420 10 ай бұрын
great explanation, thanks for doing this!
@EddyTriedCoding
@EddyTriedCoding 2 ай бұрын
update: I really appreciate these tutorials and plan to support your work soon. I had requested coverage on algorithms' time and space complexity, but Nikhil made me realize they are already included in the videos. Thanks for providing such valuable content. Big thanks and God bless you!
@nikoo28
@nikoo28 2 ай бұрын
I talk about the time and space complexity in every problem. It is always near the dry-run of the code
@EddyTriedCoding
@EddyTriedCoding 2 ай бұрын
@@nikoo28 My bad! I'll make sure to reach the end of the videos. I usually pause towards the end to convert the code into Python, which is probably why I haven't finished most of them. Thanks!
@parthmodi2028
@parthmodi2028 5 ай бұрын
Great Explaination .Pls keep making more vidoes
@athulsebastian3719
@athulsebastian3719 2 ай бұрын
Thanks, my brother. You're explanations really help me understand.❤
@nikoo28
@nikoo28 2 ай бұрын
You are very welcome
@sivan2878
@sivan2878 5 ай бұрын
Great explanation!
@prakashnavin6245
@prakashnavin6245 10 ай бұрын
very nice explanation please keep making such videos
@ikrammaududi6205
@ikrammaududi6205 2 ай бұрын
Thanks, so simple
@SaumyaSharma007
@SaumyaSharma007 9 ай бұрын
fab explanation
@xen0n20p7
@xen0n20p7 5 ай бұрын
what a solution !!
@sandeepamarnath3295
@sandeepamarnath3295 5 ай бұрын
Very well explained!
@nikoo28
@nikoo28 4 ай бұрын
Glad it was helpful!
@navyashreeamam753
@navyashreeamam753 Жыл бұрын
Hi sir, actually I seen Ur backtracking video, very simple explanation I understand easily i commented in that video to make problem solving videos, I didn't get how to solve. thankyou 😊
@nikoo28
@nikoo28 Жыл бұрын
All the best
@sanjeetnishad3807
@sanjeetnishad3807 5 ай бұрын
Actually, in the first example, you selected node 5 to check if it satisfies the bst rule and said it does but i think it doesn't. The roght child should be larger than the node, shouldn't it?
@groww-india
@groww-india 11 ай бұрын
Hi Nikhil how you are using this red hi-lighter while explaining could you pls tell.. it's look nice.. which tool you are using for Presentation
@nikoo28
@nikoo28 11 ай бұрын
that will be GoodNotes 6 on iOS
@maheshjamdade1
@maheshjamdade1 16 күн бұрын
you are mistaken at 2:04 to say that Subtree 5, 1, 4 satisfies the criteria of a binary search tree. Clearly the right child (4) is less than the parent (5)
@kanaramjangid8563
@kanaramjangid8563 10 күн бұрын
Others KZbin videos🤡🤡 Nikhil sir 👿👿
@nikoo28
@nikoo28 10 күн бұрын
why the angry devil??
@kanaramjangid8563
@kanaramjangid8563 6 күн бұрын
@@nikoo28 sir I have lots of respect for you , others KZbin videos just try to finish the code as fast as possible but you explain in best manner. So I gave a devil emojis. You explanation is far better than paid course
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 36 МЛН
LeetCode 98. Validate Binary Search Tree (Algorithm Explained)
9:48
Validate Binary Search Tree
8:00
Kevin Naughton Jr.
Рет қаралды 50 М.
L33. Requirements needed to construct a Unique Binary Tree | Theory
8:41
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 633 М.
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 36 МЛН