## Check whether the two Binary Search trees are Identical or not?

Given the root nodes of the two binary search trees. The task is to print 1 if the two Binary Search Trees are identical else… Read More »

- Flatten a binary tree into linked list
- Print nodes in top view of Binary Tree | Set 2
- Find n-th node in Postorder traversal of a Binary Tree
- Sandvine Interview Experience for FTE 2018
- Print the nodes of binary tree as they become the leaf node
- Print nodes in the Top View of Binary Tree | Set 3
- Print cousins of a given node in Binary Tree | Single Traversal
- Preorder from Inorder and Postorder traversals
- Shannon-Fano Algorithm for Data Compression
- Check if two nodes are cousins in a Binary Tree | Set-2
- Level Ancestor Problem
- 2-3 Trees | (Search and Insert)
- Find the node with maximum value in a Binary Search Tree
- Level order traversal in spiral form | Using one stack and one queue
- Iterative Preorder Traversal of an N-ary Tree
- Print all nodes between two given levels in Binary Tree
- Zig Zag Level order traversal of a tree using single queue
- Flatten a binary tree into linked list | Set-2
- Number of Isosceles triangles in a binary tree
- Iterative Segment Tree (Range Minimum Query)
- Find the maximum node at a given level in a binary tree
- Iterative Segment Tree (Range Maximum Query with Node Update)
- OYO Rooms Interview Experience (On-Campus)
- HashSet vs TreeSet in Java
- DFS traversal of a tree using recursion
- Print all even nodes of Binary Search Tree
- Delete leaf nodes with value k
- Insert a node in Binary Search Tree Iteratively
- Sort the path from root to a given node in a Binary Tree
- Preorder Traversal of N-ary Tree Without Recursion

Given the root nodes of the two binary search trees. The task is to print 1 if the two Binary Search Trees are identical else… Read More »

A Levelwise GCD/LCM alternating segment tree is a segment tree, such that at every level the operations GCD and LCM alternate. In other words at… Read More »

Given a binary tree where each node can have at most two child nodes, the task is to find the Euler tour of the binary… Read More »

The std::is_pointer template is an inbuilt template in C++ STL which is used to check the type of pointer. It is defined in header file… Read More »

Given a binary tree. Find if a given vertical level of the binary tree is sorted or not. (For the case when two nodes are… Read More »

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Given a Binary Search Tree(BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum… Read More »

Given a node x, find the number of children of x(if it exists) in the given n-ary tree. Example : Input : x = 50… Read More »

Given a tree, and the cost of a subtree is defined as |S|*AND(S) where |S| is the size of the subtree and AND(S) is bitwise… Read More »

Given a tree and weights of nodes. Weights are non-negative integers. Task is to find maximum size of a subtree of a given tree such… Read More »

Given an N-ary tree, find the number of siblings of given node x. Assume that x exists in the given n-ary tree. Example : Input… Read More »

Given N numbers and Q queries, each query consists of L and R. Task is to write a program which prints the count of numbers… Read More »

Given a binary tree, task is to find subtree with maximum sum in tree. Examples : Input : 1 / \ 2 3 / \… Read More »

Given a rectangular matrix M[0…n-1][0…m-1], and queries are asked to find the sum / minimum / maximum on some sub-rectangles M[a…b][e…f], as well as queries… Read More »

An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an… Read More »