Pre-order Traversal Algorithm | Tree Traversal | Visualization, Code, Example

  Рет қаралды 16,194

ygongcode

ygongcode

Күн бұрын

Пікірлер: 35
@AnupatraRuchutrakool
@AnupatraRuchutrakool 8 ай бұрын
IIt takes me so long to find someone who can easily explain the stack frame with recursion. This is really easy to understand! Thanks a lot.
@Mr2Am3
@Mr2Am3 3 жыл бұрын
Couldnt understand what my lecturers were teaching till I came into this video, which was explained in terms of call-stack, where my other teachers failed to recognise. Thank you for saving my grades!
@byte_easel
@byte_easel Жыл бұрын
I just wanted to say thank you so much. I know how much this time this must have taken writing the visualization animations but your work doesn't go unappreciated. You going over how it looks like at each frame in the call stack was really essential. Also, I really appreciate the visualization of the print output and where we are in the bst. Thank you so much ygong!!
@SuperBhavanishankar
@SuperBhavanishankar 11 ай бұрын
I agree thank you
@freeBirbBirb
@freeBirbBirb 10 ай бұрын
best video for understanding traversal BST, thank yo so much
@ragnarokjunekoesco7246
@ragnarokjunekoesco7246 2 жыл бұрын
By far clearest explaination on binary preorder recursion traversal, thank you!
@afrozakhatun-pr9qj
@afrozakhatun-pr9qj Ай бұрын
thank youuuuu❤❤❤❤ First time i realize this topics of recursion
@MeisterMattz
@MeisterMattz 8 ай бұрын
Great explanation! Your animations make tree traversals so much clearer. Thanks a lot
@expansivegymnast1020
@expansivegymnast1020 2 жыл бұрын
You dropped this fam 👑
@SuperBhavanishankar
@SuperBhavanishankar 11 ай бұрын
😂
@BeansEnjoyer911
@BeansEnjoyer911 2 жыл бұрын
Wow this wouldve been so helpful back in college. This stuff was a nightmare to me back then. And now a few years later, I'm needing to rebrush up on these skills to stay marketable for interviews... Thanks
@harishks308
@harishks308 8 ай бұрын
Great explanation..very useful 🙏😍
@Srinivasssssss
@Srinivasssssss 11 ай бұрын
This animation really helped a lot...
@ahmetokur6983
@ahmetokur6983 2 жыл бұрын
that was by far the best video , thank you so much for this great explanation. The only thing I don't understand is that after we are done leftmost node(1), we pop the preorder(1) from call stack and go to preorder(2) and what stops program to go again to left child of node(2) here. And instead of going to node1 again it goes back to top. i dont understad what prevent going to node1 again in the preorder2 function in the calla stack.
@ygongcode
@ygongcode 2 жыл бұрын
At 2:36, notice the yellow code arrow. We entered preorder(1) via preorder(2)'s "preorder(root.left)". So when we are done with preorder(1), we have exited out of preorder(2)'s "preorder(root.left)", so we would move onto preorder(2)'s "preorder(root.right)", so we'll never visit node(1) ever again b/c we'll never execute "preorder(root.left)" in preorder(2) past this point.
@SuperBhavanishankar
@SuperBhavanishankar 11 ай бұрын
🔥🔥😍😍🥰🥰💖💖🙏🏽🙏🏽@@ygongcode
@nwokolobueze7291
@nwokolobueze7291 2 жыл бұрын
Great explanation, the best I have seen so far. I am definitely liking and subscribing.
@chethanvenkataramaiah6940
@chethanvenkataramaiah6940 Жыл бұрын
This is seriously the best visualization explanation so far , but how does it pop things out of the stack by remembering? Like when the control hits the leaf node 1 , the left node is null , it returns null, I really dont understand how it remembers the previous execuition of the statement preorder(root.left) was null and proceed to the next statement
@pelinegriboyun948
@pelinegriboyun948 7 ай бұрын
Thank you so much, this really helps!
@عمرصطحي
@عمرصطحي Жыл бұрын
simple explanation thank you so much man
@kristuze1
@kristuze1 2 жыл бұрын
omg, it finally clicked to me!!!!!!!!!!! Thank you sooo much
@ayanaxhye
@ayanaxhye Жыл бұрын
awesome explanation sir
@htooaung6248
@htooaung6248 9 ай бұрын
THANK U BROTHER.
@alperendilaver.
@alperendilaver. Жыл бұрын
excellent explanation thank you
@AkashRoy-do2dg
@AkashRoy-do2dg 3 жыл бұрын
you are a lifesaver!
@sheikhraisulislam4483
@sheikhraisulislam4483 Жыл бұрын
why just 490 subscription... so good
@priyanshusaxena7157
@priyanshusaxena7157 3 жыл бұрын
Such a good video....
@mrcrazy1127
@mrcrazy1127 3 жыл бұрын
best video animation
@CodeWithDanishMir
@CodeWithDanishMir Жыл бұрын
can you explain why this preorder(root.right) is automatically called for the parent node even if the pointer is at the child
@pal2004
@pal2004 6 ай бұрын
I dont understand why we are making a recursive call to the Root. I mean the First Step is to process the Root, thats Not recurisve ,so why the 5 gets in to the Stack?
@justbewizu
@justbewizu Ай бұрын
good bro
@longjieguan7275
@longjieguan7275 2 жыл бұрын
very helpful
@SuperBhavanishankar
@SuperBhavanishankar 11 ай бұрын
Thank you
@চর্যাপদ-ট৬ছ
@চর্যাপদ-ট৬ছ 3 жыл бұрын
good video, Can you do this for a post-order video.
@ygongcode
@ygongcode 3 жыл бұрын
Yes, it is here kzbin.info/www/bejne/aonSXnqqd86EhJI
Learn Recursion In 5 Minutes | Visualization, Code, Example
4:51
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 576 М.
Morris Inorder Tree Traversal
11:44
Tushar Roy - Coding Made Simple
Рет қаралды 146 М.
L10. iterative Inorder Traversal in Binary Tree | C++ | Java | Stack
11:14
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 438 М.
L5. Preorder Traversal of Binary Tree | C++ | Java | Code Explanation
7:29
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 1,8 МЛН
The Midpoint Circle Algorithm Explained Step by Step
13:33
NoBS Code
Рет қаралды 131 М.