Created
February 12, 2018 20:52
-
-
Save jianminchen/ba11e8cd68e9d3b7de3fb552dc67f933 to your computer and use it in GitHub Desktop.
Group anagrams - mock interviewing - The peer came out the rating of 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interviewing.io | |
['abac', 'baca']- sort each character then use a map | |
n * mlog(m) - based on the fact that word is short, mlogm is still efficient | |
['aaaaaa' * 1000, 'aaabbbb'* 1000] -> iterate through each word then count number of characters | |
n * m | |
counting sorting | |
26 -> a 0 | |
+ | |
a+"i" | |
n1 +"+"+n2+...+ "" | |
anagram |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment