Question: Analyze Linear probing to resolve collision Given, seven students with IDs 5701, 9302, 4210, 9015, 1553, 9902, and 2104. Given also that hash table, HT,
Given, seven students with IDs 5701, 9302, 4210, 9015, 1553, 9902, and 2104. Given also that hash table, HT, of size 19, indexed 0, 1, 2,...18. Analyze and show these IDs, in the order given, are inserted in HT using the hashing function h(K) = k % 19. Analyze linear probing to resolve collision. Answer by using Table 1 and Table 2. Jadual 1: Hasil cincang dan penjejakan linear Table 1: Results of hashing and linear probing h(k) (h(k) +1)%19 (h(k) +29%19 k - 5701 9302 4210 9015 1553 9902 2104 HT[O] HT[1] HT[2] HT[3] HT[4) HT(5) HT[6] HTZ HT[8] HT[9] Jadual 2: Jadual cincang dan data Table 2: Hash table and data HT[10] HT[11] HT(12) HT[13] HT(147 HT(15) HT(167 HT[17] HT[18]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
