Virtusa interview question

Programming round - recursion, array, string