Page 1 of 1

E. Open Address Hash table(3153) Description Given an input sequence and length of Open Hash table, you are required to

Posted: Mon May 09, 2022 6:30 am
by answerhappygod
E Open Address Hash Table 3153 Description Given An Input Sequence And Length Of Open Hash Table You Are Required To 1
E Open Address Hash Table 3153 Description Given An Input Sequence And Length Of Open Hash Table You Are Required To 1 (68.03 KiB) Viewed 23 times
C programming
E. Open Address Hash table(3153) Description Given an input sequence and length of Open Hash table, you are required to create an open- addressed Hash table with Linear problem to overcome collision , then do searching on it. Hash Function set as follows: Hash(key)=key % m; We use linear probing to overcome collision: hask(key, i) = [hash(key) + i] % m where i=0-1-m. Input The first line input 3 number(n,m,t). Where n is number of input data. m is the length of Open Hash Table. t is the number of searched data. The second line enters n pieces of integers separated by space. The third line enters t pieces of integers separated by space. Output For each searched number, print out the search result. If it is found, print the number and Found. If it is not found, print the number and Not Found.
input 20 23 8 18 13 36 15 42 10 3 5 9 12 8 28 21 25 30 31 45 23 19 11 16 11 15 30 31 28 41 39 32 output 16 Not Found 11 Found 15 Found 30 Found 31 Found 28 Found 41 Not Found 39 Not Found