PayPay Interview Question

CodeSignal tasks 3 easy 1 medium