Pergunta de entrevista da empresa Capital One

Technical Interview: How to separate a string of anagrams.