Workday interview question

Anagrams.

Interview Answers

Anonymous

4 Mar 2015

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

Anonymous

4 Nov 2016

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

Anonymous

11 Feb 2015

Sort