Solutions for the interview preperation kit section in hackerrank site.
As the hackerrank code verification mechanism requires the Java file to have main class as Solution I just kept the class name as Solution, but the file name is chosen to suite with the problem. For executing a program say X.java in local, do the following in the terminal.
$ cp X.java Solution.java
$ javac Solution.java
$ java Solution