145. Binary Tree Postorder Traversal - Day 25/31 Leetcode August Challenge

  Рет қаралды 278

Programming Live with Larry

Programming Live with Larry

Күн бұрын

Пікірлер: 4
@Algorithmist
@Algorithmist 3 ай бұрын
Were you able to stack this problem up?
@abhinavchoukse2357
@abhinavchoukse2357 3 ай бұрын
I did it myself somehow but don't know how it works 😅 is it something like reverse of preorder? class Solution { public: vector postorderTraversal(TreeNode* root) { vector res; stack st; if(root==NULL)return res; st.push(root); while(!st.empty()){ TreeNode* node = st.top(); st.pop(); if(node->left!=nullptr) st.push(node->left); if(node->right!=nullptr){ st.push(node->right); } res.push_back(node->val); } reverse(res.begin(), res.end()); return res; } };
@himanshuvohra01
@himanshuvohra01 3 ай бұрын
immutable that is 😀
@ghmaxex
@ghmaxex 3 ай бұрын
Immutable? 😄 Have a good amount of sleep!
564. Find the Closest Palindrome - Day 24/31 Leetcode August Challenge
27:09
Programming Live with Larry
Рет қаралды 783
2097. Valid Arrangement of Pairs - Day 30/30 Leetcode November Challenge
1:02:46
Programming Live with Larry
Рет қаралды 504
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 19 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 38 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 34 МЛН
Binary Tree Algorithms for Technical Interviews - Full Course
1:48:53
freeCodeCamp.org
Рет қаралды 735 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 657 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 8 М.
The hidden beauty of the A* algorithm
19:22
Polylog
Рет қаралды 901 М.
TCP/IP for Programmers
3:03:31
Eli the Computer Guy
Рет қаралды 231 М.
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 124 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 19 МЛН