We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here is my algorithm. Complexity O(n). Which includes 2 passes for arrays a / b. And one additional pass for a fixed size array to hold 26 letter frequencies.
All array passes are in forward direction which shall be highly optimized by CPU preloading RAM into CPU cache.
Java Anagrams
You are viewing a single comment's thread. Return to all comments →
Here is my algorithm. Complexity O(n). Which includes 2 passes for arrays a / b. And one additional pass for a fixed size array to hold 26 letter frequencies.
All array passes are in forward direction which shall be highly optimized by CPU preloading RAM into CPU cache.