i need a code for this by using C++ language
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 1) = [hash(key) + i]%m where i=0-1-m. Input The first line input 3 numberin, mt) Where n is number of input data, mis the length of Open Hash Tablet 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. Examples 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
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 Examples 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 BO 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 input 复制 24 296 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 2 13 22 28 30 output 复制 1 Not Found 2 Not Found 13 Found 22 Found 28 Not Found 30 Not Found
E. Open Address Hash table(3153) Description Given an input sequence and length of Open Hash table, you are required to
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
E. Open Address Hash table(3153) Description Given an input sequence and length of Open Hash table, you are required to
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!