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… Read More

# Tag Archives: tree-traversal

Given an N-ary tree root, the task is to find the count of nodes such that their subtree is a binary tree. Example:Attention reader! Don’t… Read More

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… Read More

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… Read More

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… Read More

Given a Binary Tree, the task is to find the sum of leaf nodes at every level of the given tree. Examples:Attention reader! Don’t stop… Read More

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… Read More

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… Read More

Given the root node of an N-ary tree and an integer K, the task is to convert the given tree into adjacency list representation and… Read More

Given a Binary Search Tree consisting of N distinct nodes, the task is to flatten the given Binary Search Tree to convert the tree into… Read More

Given a Binary Search Tree, the task is to create a wave array from the given Binary Search Tree. An array arr[0..n-1] is called a… Read More

Given a Generic Tree consisting of N nodes valued from 0 to (N – 1) where P[i]th in the array P[] denotes ith nodes parent(1-based… Read More

Given a tree consisting of N nodes an array edges[][3] of size N – 1 such that for each {X, Y, W} in edges[] there… Read More

Given the root of a Complete Binary Tree consisting of N nodes, the task is to find the total number of nodes in the given… Read More

Given a Generic Tree consisting of N nodes, the task is to find the ZigZag Level Order Traversal of the given tree. Examples:Attention reader! Don’t… Read More