-->
当前位置:首页 > 题库

PROGRAMMING:Construction hash table

Luz5年前 (2021-05-10)题库460
Let hash table a [18], hash function is hash (k) = k% 17, using open address method to solve the conflict. In case of conflict, the incremental sequence Di = 5I is used. The hash address value corresponding to the input sequence is calculated( The number of entries will not exceed 15)
###Input format:
The first line is to input the number;
The input values corresponding to the second line are separated by spaces.
###Output format:
Each row corresponds to a value and its hash address, separated by a space (that is, there is a space before and after POS)
###Input example:
```in
five
141 73 95 112 56
```
###Output example:
```out
141 pos: 5
73 pos: 10
95 pos: 15
112 pos: 2
56 pos: 7
```







answer:If there is no answer, please comment