Backbase Interview Question

The assignment was the hardest part