Two Sigma Interview Question

A string manipulation programming problem