GlobalLogic interview question

DSA - string and arrays OOPS (basic)