Monday, February 25, 2013

Implement LookAndSay function. For example, first, let user input a number, say 1. Then, the function will generate the next 10 numbers which satisfy this condition: 1, 11,21,1211,111221,312211... explanation: first number 1, second number is one 1, so 11. Third number is two 1(previous number), so 21. next number one 2 one 1, so 1211 and so on...

Source : Heard from Junior , EPIC visit to BIT Mesra

'K' number of char arrays of different length are given, find Cartesian product of them in optimal way & give complexity.

Source : commented by user yen 

Given n, output the numbers from 0 to 2^n-1 (inclusive) in n-bit binary form, in such an order that adjacent numbers in the list differ by exactly 1 bit.

Source : Heard from Rahul, CSE, BITS ,2K10