Given a binary tree, count all subtrees in it such that every node in the subtree have same value. Get great deals at Amazon
Given a BST, find inorder successor of a given key in it. If the given key do not lie in the BST, then return the next greater key (if any) present in the BST.
Write a program to count number of ways to calculate a target number from elements of specified array by using only addition and subtraction operator. The use of any other operator is forbidden.
Given N lists of words, print all combinations of phrases that can be formed by picking one word each from each of the given lists.
Given a linked list, rearrange it by separating odd nodes from even ones. All even nodes should come before all odd nodes in the output list and the relative order of even and odd nodes should be maintained.
Given a binary tree, find maximum difference between a node and its descendants in it.
In Pots of gold game, there are two players A & B and pots of gold arranged in a line, each containing some gold coins. The players can see how many coins are there in each gold pot and each player
Given a binary tree, write an efficient algorithm to print right view of given binary tree.
Given a BST and a valid range of keys, remove nodes from BST that have keys outside the valid range.
In this post, we will see how to find all lexicographic permutations of a string where repetition of characters is allowed.
Find all N-digit binary numbers with equal sum of left and right half. N varies from [1-9] and binary number should not start with 0.
In this post, we will see how to traverse the given directory and list out all files present in it and all its sub-directories.