jforce solutions interview question

Depends on your code and your approach towards the problem statement