Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 2 : 2 probes / 2 जाँचें
Advertisement
Detailed Solution
सही उत्तर 2 probes / 2 जाँचें है।
Key Points
Helpful?
Question:
A hash table of size 7 uses double hashing with h1(k) = k mod 7 and h2(k) = 5 − (k mod 5). Key 15 is already stored. How many probes (slot examinations) does inserting key 22 need? / आकार 7 की हैश तालिका द्वि-हैशन प्रयुक्त करती है: h1(k) = k mod 7, h2(k) = 5 − (k mod 5)। कुंजी 15 पहले से संग्रहित है। कुंजी 22 डालने में कितनी जाँचें (स्लॉट परीक्षण) लगेंगी?
1.
1 probe / 1 जाँच
2.
2 probes / 2 जाँचें
3.
3 probes / 3 जाँचें
4.
4 probes / 4 जाँचें
Correct Answer: 2 probes / 2 जाँचें
h1(22) = 1, occupied by 15 (probe 1); h2(22) = 5 − 2 = 3, so next probe is (1+3) mod 7 = 4, which is free (probe 2). / h1(22) = 1, 15 से व्यस्त (जाँच 1); h2(22) = 5 − 2 = 3, अतः अगली जाँच (1+3) mod 7 = 4, जो रिक्त है (जाँच 2)।
Downloaded from PrepSnap (prepsnap.in)