Genpact Interview Question

Simple program using list and string