Tuesday, September 29, 2015

Quora Interview

Quora interview was not different than other companies interviews. He asked an easy question in the beginning of the interview about generating all anagrams of a given string. Ok generate them using next_permutation. How to write next_permutation function, I implemented it using 2 pointers. I don't really know why I failed this interview, the only possible reason was that he was passing 'const string&' to the function and i was trying to modify the string within this function, and I did not notice that.

No comments:

Post a Comment