Question
Option 3 : The node with data 12 / डेटा 12 वाला नोड
Detailed Solution
सही उत्तर The node with data 12 / डेटा 12 वाला नोड है।
Question:
A singly linked list is 5 → 12 → 7 → 20 → NULL. The standard iterative reversal uses three pointers prev, curr and nxt. After exactly TWO iterations of the loop, which node does prev point to? / एकल लिंक्ड सूची 5 → 12 → 7 → 20 → NULL है। मानक पुनरावृत्तीय उत्क्रमण में तीन पॉइंटर prev, curr व nxt प्रयुक्त होते हैं। लूप के ठीक दो पुनरावृत्तियों के बाद prev किस नोड की ओर इंगित करता है?
Correct Answer: The node with data 12 / डेटा 12 वाला नोड
Iteration 1: prev becomes 5, curr becomes 12. Iteration 2: prev becomes 12, curr becomes 7. So after exactly two iterations prev points to the node with data 12. / पुनरावृत्ति 1: prev = 5, curr = 12। पुनरावृत्ति 2: prev = 12, curr = 7। अतः ठीक दो पुनरावृत्तियों के बाद prev डेटा 12 वाले नोड की ओर इंगित करता है।