Meta Interview Question

Some easy substring problem