Tavant Interview Question

A coding question on strings