Revolut Interview Question

Home task for coding - I am not a developer