Showing posts with label code guru. Show all posts
Showing posts with label code guru. Show all posts

Sunday, July 12, 2015

Coding the Rainfall


Written by Jonathan Paul (III MCA)

Its amazing to watch how one can find so much to learn from the nature around us. Inspired by nature is this piece of challenge in which we had to simulate a situation where in rain water would be trapped in trenches and pits.
 
    It always seems to be a daunting task when we face a new challenge, but we have to understand that every problem has a solution. It’s only the time that we need to worry about, nothing else.
    So it began; I loaded a matrix with 1 representing water, 2 representing air and 3 representing land. The challenge I faced was in realising that gravity starts from the surface (a hint :P). Also, we should ensure that molecules behave naturally, fall drop by drop, and last but not the least, we should ensure that we do not add or remove molecules by faulty logic.
    The other constraints were that water molecules need to settle down and ensure they are in a stable equilibrium state. Only a layer of water molecules could settle on the surface of land. Water would flow down slopes and would accumulate in crevices.
    The fun part was added by Prof. Jibrael Jos, when he asked us to drain the water through a hole in the surface. My joy knew no bounds when I saw the water flowing out literally “naturally”.
                                    

 

Sunday, September 4, 2011

Code Guru : Gateways 2011





Winners: Jino George (I) , Aditya Gopalkrishnan (II), Raju K (III)

Jino and Aditya were just a few seconds apart and deciding one over the other was nail biting close
Sowmya came fourth. Thanks for all who came and made it a success.
We had MS Computer Science, MCA and M.Sc Computer Science taking part

Questions Were

1. Display Grid 9 by 9
Able to input Food (2 to 9) at any position
Able to input Ant (Type 1 and Type 2) at any position
2. Take Shortest Route to Food
3. Two Ants, First Who reaches takes
4. If food is 4 ants can smell only 4 steps away, if 9 then can smell 9 steps away
5. Ant 2 is mightier than Ant 1. He can grab from Ant 1 if he gets chance
6. Keep walking if smell food, once you get food walk out using shortest path
In following set up (Next Sheet)
Ant goes always to closest food source and moves out using shortest path
Final Level
7. Implement Multiple Food Source and Ants


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

Thursday, August 26, 2010

Code Guru : Gateways 2010

Conducted Code Guru in Christ University for the MCA/M.Sc Students. There was 4 questions and an hour to code and get them executing. This time top three were able to do all four questions in the allotted time and competition ended up as a nail biting finish for the IInd and IIIrd place.

Winners are :
1. Aditya Gopalakrishnan
2. Heena Gupta
3. Mahesh D
4. Rakesh Kashyap
5. Jyothsna K
6. Andrew Pereira
7. Raju K
8. Lakshmi Narayanan
9. Sowmya Stephen
10. Mark Godfrey

Time : 1 Hour
Compiler : C/C++/Java/.Net
Questions :
1. Convert a mixed string to alternate upper and lower case
2. Validate a date in mm-dd-yy and convert to dd-mm-yy
3. If user enters 2 (line) 3 (triangle) 4 (square) 5 (pentagon)
4. Create a game which is like a puzzle
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15

1 2 3 4
5 6 7
9 10 11 8
13 14 15 12
User should be able to move left,right,up,down,randomise and sort the puzzle

Questions prepared by J S Saleema, Deepthi Das, Jibrael Jos