## Range query for Largest Sum Contiguous Subarray

Given a number N, and Q queries of two types 1 and 2. Task is to write a code for the given query where, in… 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
- Check if the given Binary Tree have a Subtree with equal no of 1's and 0's
- Print all leaf nodes of a binary tree from right to left
- 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
- Print path from root to all nodes in a Complete Binary Tree
- Lazy Propagation in Segment Tree | Set 2
- 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 number N, and Q queries of two types 1 and 2. Task is to write a code for the given query where, in… Read More »

AA trees are the variation of the red-black trees, a form of binary search tree. AA trees use the concept of levels to aid in… Read More »

Consider a Binary Heap of size N. We need to find height of it. Examples : Input : N = 6 Output : 2 ()… Read More »

A Tree is a generalization of connected graph where it has N nodes that will have exactly N-1 edges, i.e one edge between every pair… Read More »

Given a root node to a tree, find the sum of all the leaf nodes which are at maximum depth from root node. Example: 1… Read More »

Given an array A of N integers. You have to answer two types of queries : 1. Update [l, r] – for every i in… Read More »

Given a tree and a node data, your task to reverse the path till that particular Node. Examples: Input : 7 / \ 6 5… Read More »

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure… Read More »

Given a binary tree, find the vertical width of the binary tree. The width of a binary tree is the number of vertical paths. In… Read More »

Given a tree, the task is to find the maximum in an only left node of the binary tree. Examples: Input : 7 / \… Read More »

Given a positive integer L which represents the number of levels in a perfect binary tree. Given that the leaf nodes in this perfect binary… Read More »

Given two Binary Trees, returns true if two trees are mirror of each other, else false. Mirror Tree : Previously discussed approach is here. Recommended:… Read More »

Given an array of n numbers, the task is to answer the following queries: kthSmallest(start, end, k) : Find the Kth smallest number in the… Read More »

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as… Read More »

Given an array of size n, the task is to find whether array can represent a BST with n levels. Since levels are n, we… Read More »