thank youuuuu❤❤❤❤ First time i realize this topics of recursion
@deepamanneАй бұрын
well done!
@ImmediatelyLeaveYTАй бұрын
top notch explanation and content sir
@joshk9571Ай бұрын
Goated video. This should be seen by more people
@for461Ай бұрын
OMG Sir you are Super. This kind of teaching should be there in every university with visualization. Thanks a lot. Many thanks Sir !!!!! Amazing Explanation.No one could explain like you. You have a lot of Patience Sir !!!!!
@oluadewilliamsАй бұрын
kzbin.info/www/bejne/d4bXdnyAl9NgoZY
@MyBinaryLife2 ай бұрын
ive been trying to learn trees for like a year and this is the best content I've found so far, thank you for putting this out
@ojithmagamage18092 ай бұрын
Thanks for this precise explanation!
@_PranavDesai2 ай бұрын
perfect! the recursive solution seemed simple enough, but I was looking for a solution using tabulation. most of my OA's are on hackerrank and recursive solutions have never passed all testcases.
@spencersedano2 ай бұрын
How does it know to not keep going to the left? 2:10
@notnotducminh2 ай бұрын
if you haven't found out the answer, it's because it has just called postorder on its left node (1), and when (1) finishes, (2) moves on to the next line
@blockchainbaddie3 ай бұрын
holy shit
@ishamaru97773 ай бұрын
This explanation was clear and precise.
@zawadhyaa4 ай бұрын
Ah, humor based on my pain
@ProbuddhaSingha-c7r5 ай бұрын
This is pretty much easier than the stack solution.
@luifrancgom5 ай бұрын
I was searching for a visualization that explained this algorithm but I found more. I didn't know about the problem in line 5. Thank you for sharing!! I am not a computer scientist but I find this phenomenon fantastic. Both expressions are mathematically equivalent but when applying to a computer things change. Excellent!!! In en.wikipedia.org/wiki/Binary_search > Implementation issues, this aspect is mention but I didn't spot it at first glance.
@Chandan-zi9ml6 ай бұрын
🛐🛐🛐🛐🛐🛐🛐🛐🛐🛐
@aepeessla6 ай бұрын
Thank you so much. Literally saved my life 👑🥹
@pal20046 ай бұрын
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?
@faryad48037 ай бұрын
Please provide the python code for fisher yates random permutation reverse back to get original text back
@pelinegriboyun9487 ай бұрын
Thank you so much, this really helps!
@elsayedmohamed4517 ай бұрын
many thanks
@shaziakaleem18957 ай бұрын
Great explanation, very helpful. Thank you
@jaletafanta56757 ай бұрын
Great Visualization, Thanks.
@Bocha697 ай бұрын
You can currently use another simpler method for this using wled and ledfx or sound reactive wled which works equally as great or even better... you can search on yt for the vids
@jd32878 ай бұрын
you should fill out the table
@DP-md4jf8 ай бұрын
Wow amazing video thank u sir. Liked and subscribed
@saliheenafridi91168 ай бұрын
Thank you very much. Yo got a subscriber
@MeisterMattz8 ай бұрын
Great explanation! Your animations make tree traversals so much clearer. Thanks a lot
@harishks3088 ай бұрын
Great explanation..very useful 🙏😍
@AnupatraRuchutrakool8 ай бұрын
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.
@htooaung62489 ай бұрын
THANK U BROTHER.
@HussainAbdi_9 ай бұрын
Nice visualisation! It would be useful to have an explanation for why the slow pointer will always catch up to a fast pointer if in a cycle, as well as edge/different cases like C1: starting on a non-cycle node vs. C2: starting on a cycle node. Within C1 also the case of 1 node before cycle, even num of nodes before cycle, odd num of nodes before cycle. Not sure if these are all relevant test cases, but definitely worth adding more explanation on completeness for future videos! Keep creating!
@ygongcode9 ай бұрын
Thanks for the feedback. You bring up good points, I’ll keep them in mind. It is also an act of trade-off of how deep I want to go. For example, proving the algorithm correctness will add a fair length to the video and might cater to a more specific set of audience.
@HussainAbdi_9 ай бұрын
@@ygongcode Yup, that makes sense! What's your vision for the channel?
@HussainAbdi_9 ай бұрын
Thank you! Preparing for my Meta interview and this video is exactly what I needed to help visualise things so I could better understand converting a BST into a DLL. As simple as the code is, being able to visualize recursion as a stack the way you did will really help internalize what's going on for harder problems. Subscribed - I see you're still making videos! Keep creating!!!
@skylersimpson48449 ай бұрын
bro is the goat
@chuudayo9 ай бұрын
this is the exact video i was looking for, thanks for this great explanation
@freeBirbBirb10 ай бұрын
best video for understanding traversal BST, thank yo so much
@sameerroshan954211 ай бұрын
what does root mean here int he function definition and base case?
@SuperBhavanishankar11 ай бұрын
Thank you <3 <3 <3
@Srinivasssssss11 ай бұрын
This animation really helped a lot...
@neuralworknet11 ай бұрын
Perfect explaination!
@mukulsharma166611 ай бұрын
Probably the best explaination ever! Thanks
@stardreamix78611 ай бұрын
Can I do this on my Raspberry Pi, I dont have arduino. :(
@amishapanwar2451 Жыл бұрын
great explanation🙌🙌
@bananaboydan3642 Жыл бұрын
What prevents the code from going back to 1 when inorder(root.left) is called
@isaicruz786711 ай бұрын
Think of each call of the inorder functions (inorder(root.left) & inorder(root.right)) causing a “freeze” of the current “instance” that you’re working through. So to your question, when we first visit root 2 (which was executed by calling inorder(root) where root is the value of 2, we skip the base case (of course) and execute inorder(root.left) and we know to replace root.left with the value of 1 since that’s root 2’s left child. At this point, think of the current “instance” that we’re working through (the execution of inorder(root) where root is the value of 2) as now being frozen in time (and for visualization help, think of the white arrow as staying stuck on pointing at the line inorder(root.left)). Since we just executed a recursive call (inorder(root.left)) with root.left being the value of 1, we go back to the top of the function to execute this (inorder(root)) where root is the value of 1. Jumping ahead a few steps since we don’t care about 1 as the root since they have no children, we eventually end up finishing working on inorder(root) where root is the value of 1. So we go back to root 2 where we left off with it “frozen” and the frozen arrow pointing at inorder(root.left). We can now “unfreeze” the arrow since everything we had to do inside of that inorder(root.left) call where root is 1, is now complete. We can now move the arrow down to the next line and continue with the last two lines. Remember, since you specifically asked about root 1, this same “freezing” technique has already occurred to other root values, so you would be “unfreezing” these instances as well when you eventually get done with their left children. Feel free to ask for clarification on anything
@ScraperCross Жыл бұрын
Incredibly helpful! Thank you so much!
@ej6431 Жыл бұрын
thank you
@xdanic3 Жыл бұрын
Always heard about this algorithm and thinking it was hard so never bothered to take a look at how it was made, this is the first video I've seen about it and understood it on the first play, thank you!!
@yashwanth73337 Жыл бұрын
How does the computer realise that a node has been processed completely i.e left and right child is none...so the current node has to be removed from the stack? How? This is what's been bugging me... How does it realise "it's time remove the node from stack"?
@ポヤポヤ Жыл бұрын
the node from stack will be removed once it reached the 'base case', the base case stops the recursion (you see the code says return). then it will proceed to the next stack.
@kostiantynshyshkovskyi6308 ай бұрын
Perhaps it will be helpful if I try to explain how I understood it. The values are added to the stack(last in first out) and it pops from the stack when we reach the base case. As soon as we face the NULL method returns the value to the caller and then the method will be called with the previous input. For instance, if we have node 1 and there’s no left nor right node it means we have input 1 and try to reach the left child it’s NULL we return the default value and take a step back to the node with 1 value print the value, and we try to reach the right child and it returns the default value because there no right child as well and we again take a step back to the node with the 1 value but we already have the outcome we return it to the caller(the previous one who called the method with this node where the value is 1)