Showing posts with label codeguru. Show all posts
Showing posts with label codeguru. Show all posts

Sunday, July 12, 2015

Coding the Conway’s Game Of Life

Written by Jonathan Paul (III MCA)
 
It was very hard to understand initially, “What is this Game of Life?”. It seemed so confusing. I was puzzled when Prof. Jibrael Jos first spoke to us about it . But then I read the four simple rules which determined the life of cells; approached sir, and he explained the life of an oscillator (Blinker). I was amazed ! It was like knife going through butter.
    I immediately got down to code it. Few if and else conditions, a little bit of concern for boundary conditions and ensure that no cells in the present generation were affected by cells of next generation ; gave me an ample of joy watching my first species oscillating on the terminal.
Then came the time to tweak the simulation. Sir asked us to discover new species. Just imagining the fact that I might find a new species in the huge ocean of the probabilistic matrix was awe-inspiring.
I wrapped the world of this simulation to allow an infinite space. Also provision for loading of discovered species into the world was given. Existing discoveries of interesting species was included in the simulation.

It was an interesting affair. I could watch these little bots moving on my screen for eternity. It has been an amazing experience coding this. And if you are interested to have fun, join the endeavor of finding new species.
 
 
 
I call this life a Village. It has a glider, blinkers which look like windmills, beehives, blocks which resemble huts, and loaves (food barn). I had fun, hope you do too.

Wiki URL : https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

 

Tuesday, September 16, 2014

CodeGuru, Gateways 2014

PG Courses @ Christ University
I  : Vora Parth Deepak  (winner for a second time)

II : Akashdeep Bhattacharya
III: Jophin P
Position 4th to 8th are as follows
Tenzin Chemi, Jonathan F P, Diganta Das, Amlanjyoti Saikia, Virapaxgouda C K

Questions were as follows
Currency Change is in denomination of
    1,2,5,10,20,50,100,500,1000

1. Store denomination in an array and display it.

2. Give a certain amount, convert it into denominations, (total number of sub denomination should be as less as possible)
    So 83 is 50+20+10+2+1

3. If this money has to be shared with two people then divide the change is such a way that it is as equal as possible
    So 83 for two people will be 41(20,20,1) and 42 (20,20,2)

4. Money shared with three people

5. Give change such that there are distinct number of pieces
  Say 86 return in  6 if possible : 50,20,10,2,2,2 or 50,10,10,10,5,1

6. If breaking up is not possible should say so
  10 in 3 is not possible 5,2,2,or 5,2,1

7. If there is a change in currency and denomination are now 1,3,5,10,50. Which number from 1 to 100 cannot be generated.

Wednesday, October 2, 2013

Code Guru: Gateways 2013

Very tight finish for the first 5 places
 

Parth Vora (I)
Samik Banik(II)
Udhay Raj (III) 

Rank 4-10 in order 

Vivian Ambrose,
Tenzin Chemi,
Talat Ahmed ,
Palak Goyal,
Pramod Das, 
Dharmappa Immannavar,
Bharat Lakkur

Congratulations !!!!


      World War Z

50 by 50 array where 
0 is empty 
1 is soldier
2 is Bullet
3 is Mine

       Level 1 Viewer   
               (Show 0 as space and soldiers as #, bullet as | and mine as * )
       Level 2 Set Army (x1,y1,x2,y2)  
       Level 3 March Past ( make a group of soldiers march in different directions N S E W)
       Level 4 Silver Bullet(when soldiers walk into it they die and bullet can kill umlimited no of soldiers)
       Level 5 Land Mine   (when soldiers step on it all around die)
       Level 6 Moving Bouncing Bullet
       Level 7 Armies, Bullets,Mines (support multiple battalions, mines and bullets)

Thursday, February 2, 2012

Code Guru : Revelation 2012

Winners: Jayati Jaiswal (I) , Sophia K (II), Shishir (III)

The competition was organized with only a 45 minute coding window. With seniors passing out this year we saw the emergence of 10 new Top Coders. There were 10 questions and Jayati and Sophia completed 7 out 10 in the slotted time

1. Jayati Jaiswal
2. Sophia K
3. Shishir
4. Shreya Rakshit
5. Abdul Kareem
6. Nitish
7. Deepak
8. Talat Ahmed
9. Shashanka
10. Pradeep and Lajith