Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ramchip
on June 26, 2017
|
parent
|
context
|
favorite
| on:
Diving into the world of hash tables
> a good strategy is to reserve the necessary memory in an array, fill it with keys/values, sort it once over the keys and coindex the value array
This explanation confuses me. Is there one or two arrays? What does "coindex" mean?
dom0
on June 26, 2017
[–]
Equal indices refer to the same entity in all places. I.e. two arrays, one for the key, one for the value. The value of the key at index
n
in the key array is found at the same index
n
in the values array.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
This explanation confuses me. Is there one or two arrays? What does "coindex" mean?