Basiq interview question

To explain why I used certain patterns in the solution.