Nbyula interview question

basic string questions can be done with mapping