Question: 2) a) Why doesn't binary search on a Linked List Structure run in O(lgn) time? b) Write insertBefore and insertAfter methods for a linked list.
2) a) Why doesn't binary search on a Linked List Structure run in O(lgn) time? b) Write insertBefore and insertAfter methods for a linked list. You can decide whether or not to use dummy nodes. Did you use dummy nodes? Why or why not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
