Thanks! After watching this video I was able to solve a similar leetcode question, "Binary Tree Right Side View"
@nikoo289 ай бұрын
that is wonderful
@himanshisingh9 Жыл бұрын
loved the approach. writing how we made queue for level order and then thinking about how we can achieve zig zag pattern with small tweaks. thanks😇
@nikoo2811 ай бұрын
Glad you liked it.
@meenakshiwadhwa462526 күн бұрын
Loved the explanation. I like the way you teach. Thanks for great content !!
@akshayrajsingh555 Жыл бұрын
Congratulations for 10k 🥳
@susmitapatil48477 ай бұрын
Best Explanation. Keep doing good work.
@saurabhruikar113110 ай бұрын
As always very nice explanation, I would like to suggest a tweak instead of using stack we could simply reverse temporayList at alternate iteration.
@nikoo289 ай бұрын
That's a great idea!
@xxxlr115 күн бұрын
You are awesome and I love your video explanations! My solution was similar but instead of using a stack, I reversed the created list for each level and added it to the final answer list based on the boolean flag. Is it the same as your solution as far as Time and Space complexity, or is it worse?
@nikoo2811 күн бұрын
as long as the time and space complexity is same, doesn't really matter
@ghanashrim2839 Жыл бұрын
The way you approach a new problem is something I'd really like to learn. Amazing explanation as usual. What software do you use for video recording and editing? Is this iPad mirrored on the screen and then screen recorded?
@nikoo28 Жыл бұрын
I use final cut pro for all the edits, and on iPad I use GoodNotes 5
@ghanashrim2839 Жыл бұрын
@@nikoo28 Thank you :)
@tanishkaagarwal67508 ай бұрын
Thank you for the wonderful explanation sir
@LalitSingh-nd5vx10 ай бұрын
thanks for awesome explanation !
@amitbhattacharya356 Жыл бұрын
There is a small mistake in the code while adding popped element from stack to level, which is self explanatory: Fixed code: TreeNode node = reverseStack.pop(); level.add(node.val); Appreciate your effort, thanks.
@nikoo28 Жыл бұрын
Thanks for clearing it out. :)
@saifahmad141 Жыл бұрын
which line??even the one on screen is running correct
@deepondas50018 ай бұрын
sir i would say you have great approach and explanation skill if you have done a great marketing then you may have thousands of views
@avinashtiwari40259 ай бұрын
can you also explain how we compute the space complexity for this ?
@nikoo288 ай бұрын
space complexity is simply the extra space we use to arrive at our solution. We use a stack, that can have the maximum of n elements in the worst case. Hence, space complexity is O(n)
@manishasharma-mh7fo Жыл бұрын
sir could u pls make a video on boundary order traversal .
@nikoo28 Жыл бұрын
can you give me an example link?
@mjeevan2408 Жыл бұрын
hi sir. I seen Ur backtracking video , I commented below that video can u replay for that comment.
@nikoo28 Жыл бұрын
How can I help you?
@navyashreeamam753 Жыл бұрын
@@nikoo28 I want more default problems with solutions on backtracking algorithm can u Make problems on that ,sir
@SibiRanganathLАй бұрын
Understood
@vibhanshusharma914310 ай бұрын
Bro for instead of stack we can simply reverse a vector Batao m puch rha hu😅