Question: (b) Assume that this ADT has two different different methods to delete all the elements from the singly linked list as follows: void delete all
(b) Assume that this ADT has two different different methods to delete all the elements from the singly linked list as follows: void delete all from start while (size > 0) delete_nth (0) return 10 void delete all from.end() { while (size > 0) delete-nth (size - 1) return 11 12 Give the complexities of these two methods in big o notation and explain how you derived them. Write the pseudocode for a much simpler and more efficient method to delete all elements from the list. [10 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
