Various Programming Interview Problems solved in Java