Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
wrsh07
on Feb 21, 2017
|
parent
|
context
|
favorite
| on:
Anagram Scoring
Sorting is O(kn) where k is the largest number. (See radix sorting)
geocar
on Feb 22, 2017
[–]
It also requires O(k) memory which is certainly larger than L1, causing two stalls instead of one.
wrsh07
on Feb 22, 2017
|
parent
[–]
In this case, k is 26. Or ASCII value of 'z'. Either way, very cheap.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: