Tutorials
Go Premium
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.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
Tree
909+ articles
Recursion
590+ articles
DFS
359+ articles
Binary Tree
330+ articles
Inorder Traversal
43+ articles
Preorder Traversal
39+ articles
tree-traversal
88 posts
Recent Articles
Popular Articles
Maximum Sum Level Except Triangular Number in Binary Tree
Last Updated: 23 April 2024
Given a Binary tree, Then the task is to output the maximum sum at any level excluding Triangular numbers. Xth Triangular numbers is the sum of starting X natural numbers,...
read more
Tree
Geeks Premier League
DSA
Binary Tree
tree-traversal
Geeks Premier League 2023
POTD Solutions | 21 Nov' 23 | Determine if Two Trees are Identical
Last Updated: 22 November 2023
View all POTD SolutionsWelcome to the daily solutions of ourPROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an optim...
read more
DSA
tree-traversal
GFG-POTD-Solutions
Check if a node is an Internal Node or not
Last Updated: 28 November 2023
Given a binary tree, for each node check whether it is an internal node or not.Examples:Input:Example-1Output: Node A: TrueNode B: TrueNode C: FalseNode D: FalseExplanatio...
read more
Tree
Picked
DSA
Basic Coding Problems
tree-traversal
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
Print the outer cone layer
Last Updated: 23 July 2025
Given a Binary tree, the task is to print the outer cone layer i.e. combination of layers formed by moving only through the left child from the root and the layer moving o...
read more
Tree
Recursion
DSA
tree-traversal
Maximize number of edges added to convert given Tree into a Bipartite Graph
Last Updated: 23 July 2025
Given a tree of N nodes, the task is to find the maximum number of edges that can be added to the tree such that it becomes a bipartite graph.Note: Self loop or multiple e...
read more
Tree
Graph
Geeks Premier League
Geeks-Premier-League-2022
DSA
tree-traversal
Step by step Shortest Path from source node to destination node in a Binary Tree
Last Updated: 23 July 2025
Given a root of binary tree and two integers startValue and destValue denoting the starting and ending node respectively. The task is to find the shortest path from the st...
read more
DSA
Trees
Binary Tree
tree-traversal
LCA
Find the parent node of maximum product Siblings in given Binary Tree
Last Updated: 23 July 2025
Given a binary tree, the task is to find the node whose children have maximum Sibling product in the given Binary Tree. If there are multiple such nodes, return the node w...
read more
Tree
Mathematical
DSA
tree-traversal
tree-level-order
Convert an arbitrary Binary Tree to a tree that holds Children Sum Property - Set 2
Last Updated: 23 July 2025
Given an arbitrary binary tree, your task is to convert it to a binary tree that holds the Children Sum Property, by incrementing the data values of any node.Note: The str...
read more
Tree
DSA
Binary Tree
tree-traversal
DFS
Count of nodes in a given N-ary tree having distance to all leaf nodes equal in their subtree
Last Updated: 23 July 2025
Given an N-ary tree root, the task is to find the number of non-leaf nodes in the tree such that all the leaf nodes in the subtree of the current node are at an equal dist...
read more
Misc
Tree
DSA
tree-traversal
n-ary-tree
Maximum count of connected duplicate nodes in given N-ary Tree
Last Updated: 23 July 2025
Given a generic tree such that each node has a value associated with it, the task is to find the largest number of connected nodes having the same value in the tree. Two n...
read more
DSA
tree-traversal
n-ary-tree
Count of nodes in given N-ary tree such that their subtree is a Binary Tree
Last Updated: 23 July 2025
Given an N-ary tree root, the task is to find the count of nodes such that their subtree is a binary tree.Example:Input: Tree in the image belowOutput: 11Explanation: The ...
read more
Misc
Tree
DSA
PostOrder Traversal
Binary Tree
tree-traversal
n-ary-tree
Check if all elements of given Linked List corresponds to a downward path from any node in given Binary Tree
Last Updated: 23 July 2025
Given a root of the Binary Tree and head of the Linked List, the task is to check if all the elements of the linked list corresponds to a downward path from any node in th...
read more
Misc
Linked List
Tree
Recursion
DSA
Binary Tree
tree-traversal
Sum of leaf nodes at each horizontal level in a binary tree
Last Updated: 23 July 2025
Given a Binary Tree, the task is to find the sum of leaf nodes at every level of the given tree.Examples:Input:Output:0063012Explanation:Level 1: No leaf node, so sum = 0L...
read more
TrueGeek-2021
DSA
Binary Tree
tree-traversal
tree-level-order
Convert given Binary Tree to Symmetric Tree by adding minimum number of nodes
Last Updated: 23 July 2025
Given a Binary Tree, the task is to convert the given Binary Tree to the Symmetric Tree by adding the minimum number of nodes in the given Tree.Examples:Input:Output:Input...
read more
Tree
Recursion
DSA
Inorder Traversal
Binary Tree
tree-traversal
1
2
3
4
5
6
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 !