Epic Interview Question

Basic string manipulation, and big-O complexity.