TripStack interview question

Simple codes were given to solve consisting of string operations...