Backbase Interview Question

2 Coding questions of medium difficulty.