Sunday, May 23, 2010

Leaf to root path sum up to given number

Given a binary tree and a sum , return true if the tree has a "root to leaf" path such that adding up all the values along the path equals the given sum.
Return false if there is no path.

Successor integer with all unique digits.

Given a positive integer having all unique digits. Find the immediate next greater number having the same digits.

Pair of numbers which sum up to zero

Given an array of positive and negative integers. Find the pair of number whose sum is closer to zero.

Program to convert numbers into roman literals

Write a program to convert a number into roman numerals.



Decreasing order of integers from a stream of infinite numbers.

Given stream of infinite no of integers and a function named getnext() which gives the next integer from stream continuously.U have to store the numbers in decreasing order and remove duplicate also in efficient manner.

All duplicates and their counts in a string

Write an efficient C program to print all the duplicates and their counts in the input string


Here is the information for this problem

http://geeksforgeeks.org/?p=16

Given sum is consecutive integer or not

Given a number determine wether the number is sum of consecutive positive integers,if it is not return false else return true. conscutive integers can be from 2 to n