PayPay interview question

String manipulation, arrays type questions