Huld Interview Question

It was a coding assignment on Java.