Question 27Asked in Bihar STET 2024 Paper II Computer Science, 11 Jun 2024, Shift 2 (3:00 PM)

Which type of linked list is most suitable for implementing a queue data structure?कतार डेटा संरचना को लागू करने के लिए किस प्रकार की लिंक की गई सूची सबसे उपयुक्त है?

कतार डेटा संरचना को लागू करने के लिए किस प्रकार की लिंक की गई सूची सबसे उपयुक्त है?
  1. ASingly linked listएकल लिंक्ड लिस्ट
  2. BDoubly linked listदोगुनी लिंक की गई सूची
  3. CCircularly linked listपरिपत्र रूप से लिंक की गई सूची
  4. DArray implementation of linked listलिंक्ड सूची का सरणी कार्यान्वयन
Show answerHide answer

Correct answer: (A) Singly linked listएकल लिंक्ड लिस्ट

Explanation

A singly linked list with front and rear pointers gives O(1) enqueue at the rear and O(1) dequeue at the front, so no backward links are needed.आगे और पीछे के pointers वाली singly linked list पीछे से O(1) में enqueue और आगे से O(1) में dequeue देती है, इसलिए पीछे की ओर जाने वाले लिंक की ज़रूरत नहीं है।

From Bihar STET 2024 Paper II Computer Science PYQ, 11 Jun 2024, Shift 2 (3:00 PM)

This is question 27 of Bihar STET 2024 Paper II Computer Science PYQ, 11 Jun 2024, Shift 2 (3:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.