Question: Using the remove all solution discussed in problem 1 and 2 which of the following linked lists would require more comparisons if all 3 s

Using the remove all solution discussed in problem 1 and 2 which of the following linked lists would require more comparisons if all 3s were removed? The comparisons should be counted both in the contains and remove function.
A: HEAD ->0->2->0->2->3->1->1-> NULL
B: HEAD ->3->3->2->3->3->2->0->1-> NULL
A
B(wrong answer)
Equal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!