Determine Big O for the following Java code for two cases: one in which the list
ID: 3549079 • Letter: D
Question
Determine Big O for the following Java code for two cases: one in which the list passed in
is an array based list and the other a doubly linked list. You are not expected to look up the source
code for these lists. Make reasonable assumptions about their implementation and then write down
what assumptions you made and why. The linked based list does not use an iterator. The
length of the list is n.
Explanation / Answer
Array- based: O(n^2)
Linked list based: O(n)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.