Saturday, February 5, 2011

Code Guru : Revelation 2011


Winners: Heena Gupta (I) , Sowmya (II), Aditya G (III)

Other is top 10 in order
Charu J, Jyotsana, Raju K, Boopalan R, Rakesh K, Lakshminarayan, Nibedita S
Questions Were

1. In Zee land , they study Zaths. Some numbers are considered as Zamazing number and some as Zawesome
A number is considered Zawesome if 2109 is found somewhere in the number together
eg. 122312109876
A number is considered Zamazing if 2109 is found somewhere in the number
eg. 12921990982
Write a program to check if an inputted number is Zamazing or Zawesome or not

2. If A thinks of a 4 digit number in which each digit is unique, B takes a guess
eg. A thinks : 7345 B Says 9647 : A says 1 Zing (because 7 is correct but in wrong place) 1 Zong (because 4 is correct and in right place)
eg. A thinks : 7345 B Says 9347 : A says 1 Zing (because 7 is correct but in wrong place) 2 Zong (because 3 and 4 is correct and in right place)
Game is over if B Guesses 7345 and A says 4 Zongs !!!
Assume both numbers have no repetition of digit
Create a game where computer thinks of a 4 digit number and lets users answer with a 4 digit number . Computer should reply how many zings and zongs. Computer should allow user to attempt as many time needed to zolve the puzzle

3. Make a an array of 9 by 12 as shown in sheet 2.
0 means land 8 means rain drops
Make the exact landscape as displayed in the next sheet under Level 1
Level 1: Raindrops fall in each round but they do not go side ways
Level 2: Raindrops try to fall if not possible slide in case gap at lower level. In case 2 drops in contention for slide preference for the one drop which slides right as this is the Northern Hemisphere ??
Level 3: Multiple round of rain should work
Level 4: Make it work in this different landscape, If a drop can fall both left and right it will fall right
Level 5: In case a whole is made at bottom of the land show how the water will flow out

4.Make a variation of Zing Zong (question 2) where user thinks of a number and computer takes guesses
A good algo will solve any 4 digit number in 7 or less guesses