This one took me quite some time to figure out. Main reason were the test cases that were not generated for the inputs I provided, which made it hard for be to find the pattern… the actual implementation was quite easy then. My algorithms teacher would kill me for the prime detection, though…
► All CodeHunt Episodes: http://goo.gl/WtTJ3L
► Let’s Develop! http://letsdeveloper.com
► Don’t Miss an Episode: http://goo.gl/whzDi1
«CodeHunt»
An educational coding game from Microsoft Research. https://codehunt.com
«Other Series»
► Let’s Develop Conway’s Game of Life: http://goo.gl/xc59GX
► Let’s Develop With Git in Eclipse: http://goo.gl/phqnDe
► Let’s Develop With Maven in Eclipse: http://goo.gl/3KK2gb
► Let’s Develop CodeHunt: http://goo.gl/WtTJ3L
Share this: | Follow me: