Adyen Interview Question

HackerRank exercise and then reviewing your solution adding problems/complexity on top of it.