|
|
|
|
|
|
j*****y 发帖数: 1071 | 1 clrs 上 11.1 的一道题
Suggest how to implement a direct-address table in which the keys of stored
el-
ements do not need to be distinct and the elements can have satellite data.
All
three dictionary operations (INSERT, DELETE, and SEARCH) should run in O(1)
time. (Don’t forget that DELETE takes as an argument a pointer to an object
to be deleted, not a key.)
要用 O(1) time的话应该不是用 chaining 吧。 | t*********h 发帖数: 941 | 2 hashmap+linkedlist?
stored
.
object
【在 j*****y 的大作中提到】 : clrs 上 11.1 的一道题 : Suggest how to implement a direct-address table in which the keys of stored : el- : ements do not need to be distinct and the elements can have satellite data. : All : three dictionary operations (INSERT, DELETE, and SEARCH) should run in O(1) : time. (Don’t forget that DELETE takes as an argument a pointer to an object : to be deleted, not a key.) : 要用 O(1) time的话应该不是用 chaining 吧。
| j*****y 发帖数: 1071 | 3 这是 hash table 那一章的第一节,不会这么复杂吧。
【在 t*********h 的大作中提到】 : hashmap+linkedlist? : : stored : . : object
| w**********o 发帖数: 140 | 4 I think it should be hash table which using chaining.
i.e. http://faculty.cs.niu.edu/~freedman/340/340notes/340hash.htm |
|
|
|
|
|
|