## Find total ways to achieve given sum with n throws of dice having k faces

Calculate total number of ways to achieve given sum with n throws of dice having k faces.

## Update every key in BST to contain sum of all greater keys

Given a binary search tree, modify it such that every key is updated to contain sum of all greater keys present in BST.

## Fix a binary tree that is only one swap away from becoming a BST

Given a binary tree that is only one swap away from becoming a BST, convert the binary tree into BST in single traversal of it.

## Find maximum sum path between two leaves in a binary tree

Given a binary tree, write an efficient algorithm to find maximum sum path between any two leaves in it.

## Find all nodes at given distance from leaf nodes in a binary tree

Given a binary tree, write an efficient algorithm to find all nodes present at given distance from any leaf node. We need to find only those nodes that are present in root-to-leaf path for that leaf.

## Print all combination of numbers from 1 to n having sum n

Given a positive integer n, print all combination of numbers from 1 to n having sum n.

## Count all subtrees having same value of nodes in a binary tree

Given a binary tree, count all subtrees in it such that every node in the subtree have same value.

## Find Inorder Successor for given key in a BST

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.

## Find ways to calculate a target from elements of specified array

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.

## Print all combinations of phrases that can be formed by picking words from each of the given lists

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.

## Rearrange a Linked List by Separating Odd Nodes from the Even Ones

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.

## Find Maximum Difference Between a Node and its Descendants in a Binary Tree

Given a binary tree, find maximum difference between a node and its descendants in it.