Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 3 : 6
Advertisement
Detailed Solution
सही उत्तर 6 है।
Key Points
Helpful?
Question:
What is the minimum number of link (pointer) updates required to reverse a singly linked list of 6 nodes? / 6 नोड्स वाली एकल लिंक्ड लिस्ट को उल्टा करने के लिए आवश्यक लिंक (पॉइंटर) अपडेट्स की न्यूनतम संख्या क्या है?
1.
3
2.
5
3.
6
4.
12
Correct Answer: 6
Every node's next pointer must be redirected: the head's next becomes NULL and each of the other five nodes points to its predecessor, giving 6 updates in total. / प्रत्येक नोड के next पॉइंटर को पुनर्निर्देशित करना होता है: head का next NULL होता है और अन्य पाँच नोड अपने पूर्ववर्ती की ओर इशारा करते हैं, कुल 6 अपडेट्स।
Downloaded from PrepSnap (prepsnap.in)