Articles tagged with Tree
- Most Frequent Subtree Sum - Plain and simple DFS, published 2024-05-08
- Pseudo-Palindromic Paths in a Binary Tree - Simple DFS with palindrome test at leaves, published 2024-01-24
- Leaf-Similar Trees - Leaf Iterator, published 2024-01-09
- Count Nodes Equal to Average of Subtree - Simple recursion in O(n) TC, published 2023-11-02
- Find Mode in Binary Search Tree - Two solutions: O(h) space and O(1) space, published 2023-11-01
- Find Largest Value in Each Tree Row - BFS and DFS solutions, published 2023-10-24
- Validate Binary Tree Nodes - DFS solution, published 2023-10-17
- Unique Binary Search Trees II - Recursion and memoization DP, published 2023-06-20
- Maximum Level Sum of a Binary Tree - BFS in Java, published 2023-06-15
- Minimize the Total Price of the Trips - DFS + DP solution with explanation, published 2023-04-27
- Maximum Width of Binary Tree - Step by step BFS, published 2023-04-24
- Cousins in Binary Tree II - DFS solution + BFS solution, published 2023-04-15
- Convert Sorted List to Binary Search Tree - An elegant solution, published 2023-03-11
- Construct Quad Tree - 3 ways to do recursion, flyweight pattern, published 2023-02-27
- Count Complete Tree Nodes - Recursivle solution with explanation, published 2022-11-16
- Minimum Number of Operations to Sort a Binary Tree by Level - BFS + Min swaps to sort, published 2022-11-13
- Kth Largest Element in a Stream - Min Heap, published 2022-11-13
- Unique Binary Search Trees - [100%] Easy DP, published 2022-10-25
- Path Sum III - Easy DFS, published 2022-10-25
- Binary Tree Right Side View - Easy BFS, published 2022-10-25
- Populating Next Right Pointers in Each Node - BFS+Queue O(1) space, O(n) time, published 2022-10-14
- Flatten Nested List Iterator - Simple Recursion, published 2022-10-13
- Binary Tree Zigzag Level Order Traversal - BFS using Queue, published 2022-10-06
- Add One Row to Tree - Easy to understand DFS solution, published 2022-10-05
- Validate Binary Search Tree - Iterative InOrder C++, published 2022-08-11
- Deepest Leaves Sum - Easy DFS solution, published 2022-05-15
- Populating Next Right Pointers in Each Node II - Connections using Level Wise Traversal DFS, published 2022-05-13
- Binary Tree Level Order Traversal - Three methods - Two DFS + One BFS, published 2022-05-13
- Binary Search Tree Iterator - Two solutions: Easy and Medium, published 2022-04-20
- Convert BST to Greater Tree - Easy HashMap solution, published 2022-04-16
- Binary Search Tree to Greater Sum Tree - Easy HashMap solution, published 2022-04-16
- Trim a Binary Search Tree - Recursive C++ solution, published 2022-04-15
- N-ary Tree Level Order Traversal - Easy BFS solution, published 2022-01-19
- House Robber III - Recursion+Memoization [cpp] Explained with intuitions step-wise, published 2022-01-07
- Construct Binary Tree from Preorder and Inorder Traversal - Two easy to understand recursive solutions, published 2022-01-06