Ask Media Group interview question

Split a string based on circular doubly-linked list