Workday interview question

Anagrams.

Interview Answers

Anonymous

Mar 4, 2015

don't need to sort, sort would cause O(nlogn). Use a character array for O(n)

Anonymous

Nov 4, 2016

if you don't sort you would be using extra space.. thats is the trade off

Anonymous

Feb 11, 2015

Sort