Pergunta de entrevista da empresa Wayfair

Array sorting question, similar to Dutch flag. Make all possible combinations of words in a vector without recursion. Repeated questions from past interviews that were listed on Glassdoor, so helped a lot!