Hudson River Trading Interview Question

One string manipulation question testing recursion