Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.7K+ articles
DSA
20.1K+ articles
Misc
7.8K+ articles
Tree
914+ articles
Recursion
598+ articles
Binary Tree
330+ articles
Tree Traversals
106+ articles
tree-traversal
88+ articles
Inorder Traversal
43+ articles
PostOrder Traversal
37+ articles
Preorder Traversal
39 posts
Recent Articles
Popular Articles
Remove nodes from Binary Tree such that sum of all remaining root-to-leaf paths is atleast K
Last Updated: 29 October 2024
Given a Binary Tree and an integer k, the task is to delete nodes from the given Tree such that the sum of all nodes of all remaining root-to-leaf paths is at least k.Exam...
read more
Tree
Recursion
DSA
Preorder Traversal
PostOrder Traversal
Tree Traversals
morris-traversal
Print all root-to-leaf paths with maximum count of even nodes
Last Updated: 13 August 2021
Given a Binary tree, the task is to print all possible root-to-leaf paths having a maximum number of even valued nodes.Examples:Input: 2 / \ ...
read more
DSA
Preorder Traversal
Binary Tree
Tree Traversals
Basic Operations on Binary Tree with Implementations
Last Updated: 24 February 2025
The tree is a hierarchical Data Structure. A binary tree is a tree that has at most two children. The node which is on the left of the Binary Tree is called “Left-Child” a...
read more
Tree
Technical Scripter
Internship
Recursion
Technical Scripter 2020
DSA
Inorder Traversal
Preorder Traversal
PostOrder Traversal
Binary Tree
tree-traversal
tree-level-order
Experiences
Preorder, Postorder and Inorder Traversal of a Binary Tree using a single Stack
Last Updated: 18 January 2022
Given a binary tree, the task is to print all the nodes of the binary tree in Pre-order, Post-order, and In-order iteratively using only one stack traversal.Examples:Input...
read more
DSA
Inorder Traversal
Preorder Traversal
PostOrder Traversal
Binary Tree
Tree Traversals
cpp-stack
Lexicographically smallest Palindromic Path in a Binary Tree
Last Updated: 07 March 2022
Given a Binary Tree with each node representing an alphabet, the task is to find lexicographically smallest palindromic root to leaf path. If no palindromic path exists, p...
read more
Strings
Tree
DSA
Preorder Traversal
Binary Tree
palindrome
Reverse
Modify Binary Tree by replacing each node with the sum of its Preorder Predecessor and Successor
Last Updated: 24 December 2021
Given a binary tree consisting of N nodes, the task is to replace each node in the binary tree with the sum of its preorder predecessor and preorder successor.Examples:Inp...
read more
Tree
Recursion
DSA
Preorder Traversal
Tree Traversals
Modify Binary Tree by replacing each node with the product of all remaining nodes
Last Updated: 30 June 2021
Given a Binary Tree consisting of N nodes, the task is to replace each node of the tree with the product of all the remaining nodes.Examples:Input: 1 / \ 2 3 ...
read more
Tree
Mathematical
Recursion
DSA
Inorder Traversal
Preorder Traversal
Binary Tree
tree-traversal
DFS
Construct a Perfect Binary Tree from Preorder Traversal
Last Updated: 20 October 2021
Given an array pre[], representing the Preorder traversal of a Perfect Binary Tree consisting of N nodes, the task is to construct a Perfect Binary Tree from the given Pre...
read more
DSA
Preorder Traversal
Binary Tree
tree-traversal
Check if given inorder and preorder traversals are valid for any Binary Tree without building the tree
Last Updated: 10 January 2024
cGiven two arrays pre[] and in[] representing the preorder and inorder traversal of the binary tree, the task is to check if the given traversals are valid for any binary ...
read more
DSA
Inorder Traversal
Preorder Traversal
Binary Tree
tree-traversal
Minimize absolute difference between sum of subtrees formed after splitting Binary tree into two
Last Updated: 16 September 2021
Given a binary tree consisting of N nodes, the task is to split the binary tree into two subtrees by removing one edge such that the absolute difference of the sum of the ...
read more
DSA
Preorder Traversal
PostOrder Traversal
Find direction of path followed from root by a linked list in a Binary Tree
Last Updated: 26 December 2022
Given root of the Binary Tree T and a linked list L, the task is to find the direction of path followed from root such that there exists a path from root to any leaf node ...
read more
Linked List
Tree
Backtracking
Recursion
DSA
Linked Lists
Preorder Traversal
tree-traversal
Check if given Generic N-ary Tree is Symmetric horizontally
Last Updated: 12 January 2022
Given an N-ary tree root, the task is to check if it is symmetric horizontally (Mirror image of itself).Example:Input: root = 7 / / \ \ ...
read more
Tree
Dynamic Programming
Recursion
DSA
Preorder Traversal
n-ary-tree
Time and Space Complexity Analysis of Tree Traversal Algorithms
Last Updated: 31 May 2023
Let us discuss the Time and Space complexity of different Tree Traversal techniques, such as Inorder Traversal, Preorder Traversal, Postorder Traversal, etc.Time Complexit...
read more
Tree
DSA
Inorder Traversal
Preorder Traversal
PostOrder Traversal
tree-traversal
Data Structures-Tree Traversals
Tree Traversals
Complexity-analysis
Paths of Triangular Number in a Binary Tree
Last Updated: 24 February 2024
Given a Binary Tree, the task is to output the Count of the number of paths formed by only a Triangular number. Xth Triangular number is the sum of the first X natural num...
read more
Tree
Geeks Premier League
DSA
Preorder Traversal
Binary Tree
triangular-number
Geeks Premier League 2023
Preorder vs Inorder vs Postorder
Last Updated: 17 April 2024
InPreorder Traversal, the root node is visited first, followed by the left and right subtrees.Inorder Traversalstarts with the left subtree, visits the root, and then the ...
read more
Tree
DSA
Trees
Inorder Traversal
Preorder Traversal
PostOrder Traversal
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !