Anaplan interview question

To write some Java code for a problem similar to the type faced at the company. In the interview we discussed the problem generally and my solution specifically.