Question 82Asked in Bihar STET 2025 Paper II Computer Science, 3 Nov 2025, Shift 2 (2:00 PM)

In pointer implementation of linked lists, which operation can be performed in constantलिंक की गई सूचियों के सूचक कार्यान्वयन में, नोड्स डालते या हटाते समय निरंतर समय (ओ (1)) में

In pointer implementation of linked lists, which operation can be performed in constant time (O(1)) when inserting or deleting nodes?
लिंक की गई सूचियों के सूचक कार्यान्वयन में, नोड्स डालते या हटाते समय निरंतर समय (ओ (1)) में कौन सा ऑपरेशन किया जा सकता है?
  1. AInserting at the beginningशुरुआत में सम्मिलित करना
  2. BInserting at the endअंत में सम्मिलित करना
  3. CInserting at a specific positionएक विशिष्ट स्थिति में सम्मिलित करना
  4. DDeleting a specific nodeएक विशिष्ट नोड को हटाना
Show answerHide answer

Correct answer: (A) Inserting at the beginningशुरुआत में सम्मिलित करना

Explanation

Inserting at the beginning of a linked list only needs a new node pointing to the old head and an updated head pointer, so it takes O(1) time. The others need traversal.लिंक्ड लिस्ट के आरंभ में डालने के लिए केवल पुराने head की ओर इशारा करता नया नोड और अद्यतन head पॉइंटर चाहिए, इसलिए O(1) समय लगता है। अन्य में traversal चाहिए।

From Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2:00 PM)

This is question 82 of Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2: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.