Zoho Interview Question

coding mostly on array and strings