Tuesday, March 15, 2011

Given a range find how many numbers occur within it.

You are receiving a continuous stream of numbers, at any point i'll provide a range eg: 5- 15 and the output should be the number of numbers between 5-15.

P.S. - Since the input is a stream the output can change for the same range if the function is called again.