Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 3 : head points to the node containing 30 and head→next→data is 20 / head 30 वाले नोड को इंगित करेगा और head→next→data 20 होगा

Advertisement

Detailed Solution

सही उत्तर head points to the node containing 30 and head→next→data is 20 / head 30 वाले नोड को इंगित करेगा और head→next→data 20 होगा है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

A singly linked list is 10 → 20 → 30 → NULL. After the standard iterative reversal using three pointers, which node does head point to, and what is head→next→data? / एकल लिंक्ड सूची 10 → 20 → 30 → NULL है। तीन पॉइंटर वाले मानक पुनरावृत्तीय उत्क्रमण के बाद head किस नोड को इंगित करेगा, और head→next→data क्या होगा?

1.
head points to the node containing 10 and head→next→data is 20 / head 10 वाले नोड को इंगित करेगा और head→next→data 20 होगा
2.
head points to the node containing 30 and head→next→data is 10 / head 30 वाले नोड को इंगित करेगा और head→next→data 10 होगा
3.
head points to the node containing 30 and head→next→data is 20 / head 30 वाले नोड को इंगित करेगा और head→next→data 20 होगा
4.
head points to the node containing 20 and head→next→data is 30 / head 20 वाले नोड को इंगित करेगा और head→next→data 30 होगा

Correct Answer: head points to the node containing 30 and head→next→data is 20 / head 30 वाले नोड को इंगित करेगा और head→next→data 20 होगा

Reversal flips every link, giving 30 → 20 → 10 → NULL; head points to the node with 30, whose next holds 20. / उत्क्रमण हर लिंक को पलट देता है: 30 → 20 → 10 → NULL; head 30 वाले नोड को इंगित करता है, जिसका अगला 20 रखता है।

Downloaded from PrepSnap (prepsnap.in)