## Clone a Binary Tree with Random Pointers

Given a Binary Tree where every node has following structure. struct node { int key; struct node *left,*right,*random; } The random pointer points to any… Read More »

- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Kth smallest element in a subarray
- Introduction to Data Structures | 10 most commonly used Data Structures
- Total number of possible Binary Search Trees using Catalan Number
- Iterative Postorder traversal | Set 3
- Convert a given Binary Tree to Circular Doubly Linked List | Set 2
- Adobe Interview Experience ( 3 Years Exp )
- LCA in a tree using Binary Lifting Technique
- Find the node with maximum value in a Binary Search Tree using recursion
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Sum of nodes in bottom view of Binary Tree
- Print all leaf nodes of a binary tree from right to left
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Check if two nodes in a Binary Tree are siblings
- Create a mirror tree from the given binary tree
- Print Binary Tree levels in sorted order | Set 3 (Tree given as array)
- K-th ancestor of a node in Binary Tree | Set 3
- Lazy Propagation in Segment Tree | Set 2
- Print path from root to all nodes in a Complete Binary Tree
- Sum of nodes in top view of binary tree
- Pair with a given sum in BST | Set 2
- Maximum sub-tree sum in a Binary Tree such that the sub-tree is also a BST
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Clockwise Spiral Traversal of Binary Tree | Set - 2
- Find the node with minimum value in a Binary Search Tree using recursion
- Minimum steps to color the tree with given colors
- Construct BST from its given level order traversal | Set-2
- Minimum sum path between two leaves of a binary tree
- Sum of the distances from every node to all other nodes is maximum

Given a Binary Tree where every node has following structure. struct node { int key; struct node *left,*right,*random; } The random pointer points to any… Read More »

Recently Microsoft IDC had visited our Campus for Intenship. There were 6 rounds in total for me. Objective Round :- The objective round was taken… Read More »

Left-Right representation of a binary tree is standard representation where every node has a pointer to left child and another pointer to right child. Down-Right… Read More »

Given a binary tree, print level order traversal in a way that nodes of all levels are printed in separate lines. For example consider the… Read More »

Given the binary Tree and the two nodes say ‘a’ and ‘b’, determine whether the two nodes are cousins of each other or not. Two… Read More »

Given two binary trees, check if the first tree is subtree of the second one. A subtree of a tree T is a tree S… Read More »

I recently encountered with a question in an interview at e-commerce company. The interviewer asked the following question: There is BST given with root node… Read More »

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximum… Read More »

Inorder traversal of a Binary tree can either be done using recursion or with the use of a auxiliary stack. The idea of threaded binary… Read More »

Given a Perfect Binary Tree, reverse the alternate level nodes of the binary tree. Given tree: a / \ b c / \ / \… Read More »

I recently cleared the Amazon SDE position. Through out my prepration GeeksforGeeks played great role, this is the only site which i referred/followed more than… Read More »

Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5… Read More »

Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from… Read More »

Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem. Input: Two arrays that… Read More »

Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k… Read More »