Revolut Interview Question

Tell me how you would solve this problem