Recursion Depth - Java

Recently, in a programming competition, I made a big mistake by using recursion for solving one of the problems, as it resulted in 'StackOverflow' error and lost the chance to solve the problem for a larger input dataset. I realized it immediately and implemented a normal solution, but there wasn't...

» [Read More]

GCJ 2014 - 'Deceitful War'

Below is the problem statement for 'Magic Trick' problem from the Google Code Jam - 2014: Problem D. Deceitful War Problem------- Naomi and Ken sometimes play games together. Before they play, each of them gets N identical-looking blocks of wood with...

» [Read More]

GCJ 2014 - 'Cookie Clicker Alpha' Problem

Below is the problem statement for 'Cookie Clicker Alpha' problem from the Google Code Jam - 2014:Problem B. Cookie Clicker AlphaIntroduction------------Cookie Clicker is a Javascript game by Orteil, where players click on a picture of a giant cookie....

» [Read More]

GCJ 2014 - Magic Trick

Below is the problem statement for 'Magic Trick' problem from the Google Code Jam - 2014:Problem A. Magic TrickRecently you went to a magic show. You were very impressed by one of the tricks, so you decided to try to figure...

» [Read More]

RESTFul Web Service - Seam Component Injection

If you have to incorporate a RESTFul webservice into an existing (or new) Web application, which uses SEAM as one of the technologies in it's tech-stack, then you probably want to use Seam component injections in your RESTFul webservice. If your RESTFul service's URI's are something like:...

» [Read More]