Separate chaining involves storing collided elements in separate data…

2025

Separate chaining involves storing collided elements in separate data structures, typically in:

  1. A.

    Linked lists

  2. B.

    Arrays

  3. C.

    Stacks

  4. D.

    Queues

Attempted by 541 students.

Show answer & explanation

Correct answer: A

Separate chaining is a collision resolution technique used in hash tables. When two or more keys hash to the same index, the collided elements are stored together in a data structure at that index.

The most common data structure used for this purpose is a linked list. This is because linked lists allow dynamic insertion of elements, making them ideal for handling varying numbers of collisions at a single index.

Each index in the hash table points to the head of a linked list. When a collision occurs, the new element is added to the list at that index.

This method ensures that even if many elements collide, they can still be stored and retrieved efficiently.

हिन्दी उत्तर:

सेपरेट चेनिंग एक हैश टेबल में टकराव के निपटान की तकनीक है। जब दो या अधिक कुंजियाँ एक ही इंडेक्स पर हैश होती हैं, तो टकराए हुए तत्वों को उस इंडेक्स पर एक डेटा संरचना में संग्रहित किया जाता है।

इस उद्देश्य के लिए सबसे आम डेटा संरचना लिंक्ड लिस्ट है। यह इसलिए है क्योंकि लिंक्ड लिस्ट तत्वों के गतिशील इन्सर्शन की अनुमति देती है, जो एक इंडेक्स पर विभिन्न संख्या में टकराव को संभालने के लिए आदर्श है।

हैश टेबल का प्रत्येक इंडेक्स उस इंडेक्स पर लिंक्ड लिस्ट के सिरे को इंगित करता है। जब टकराव होता है, तो नया तत्व उस इंडेक्स पर लिस्ट में जोड़ा जाता है।

इस विधि सुनिश्चित करती है कि भले ही कई तत्व टकराएं, वे अभी भी कुशलता से संग्रहित और पुनर्प्राप्त किए जा सकें।

Explore the full course: Bpsc