Cashfree interview question

Algorithms and DS questions