Various Programming Intreview Problems solved in Java