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

# Tag Archives: Preorder Traversal

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

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

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

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

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

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

Given a Binary Tree, the task is to count the number of nodes in the given Binary Tree such that the path from the root… Read More

Given a Binary Tree consisting of N nodes rooted at 1, an integer K and an array arr[] consisting of values assigned to each node,… Read More

Given a Binary Tree consisting of N nodes, the task is to print its Mix Order Traversal. Mix Order Traversal is a tree traversal technique,… Read More

Given two Binary Trees, the task is to create a Maximum Binary Tree from the two given binary trees and print the Inorder Traversal of… Read More

Given a Binary Tree, the task is to find the maximum value of GCD from any path from the root node to the leaf node.… Read More

Given a binary tree and a value K, the task is to check if every node of the binary tree has either value of the… Read More

Given a binary tree consisting of N nodes, the task is to print the nodes that are just above the leaf node.Examples: Input: N =… Read More

Given a Binary Tree, the task is to count the number of Fibonacci paths in the given Binary Tree. Fibonacci Path is a path which… Read More