DEV Community

Discussion on: What's your favorite interview question?

dgreene profile image
Dan Greene

One that I got a long time ago was design an algorithm to sort a list of words by anagram - so the words 'cat' and 'act' would appear together.

When I got the generic 'sort list of words' question previously, I said I would send to the language's 'sort' command - any developer of mine that thought they were smarter than a tried-and-true honed api wouldn't be hired, or would be a risk of being fired if I found it in a code review. My rationalization allowed it to be a correct answer.