Introduction
I had a mock interview March 1 8:00 PM, the peer asked me to solve the group of anagrams. I remembered the conversation I had with an engineer in mock interview before, he told me that he got full score of 4 on anonymous interview platform, and then I told him that I solved the algorithm correctly over 25 minutes, but I only got 2 out of 4.
The correct solution should discuss different cases. If words are short, then it is ok to sort the words, and use sorted words as keys of anagrams. Otherwise, we can define the anagrams keys using self-defined keys.
Mock interview practice
Here is my analysis in the mock interview. 10 minutes, no coding.
No comments:
Post a Comment