Question: 2. Please answer the questions below (Make sure to identify your answer by the question number): list 1 2 3 4 next prev a. Will

2. Please answer the questions below (Make sure to identify your answer by the question number): list 1 2 3 4 next prev a. Will you lose access to any node after executing the following statement? If so, which one(s)?. list.next.prev = list.prev; b. Will you lose access to any node after executing the following statement based on the original list shown? If so, which one(s)?. list.next = list.prev; 2. Please identify at least one real life scenario that a doubly linked list is a better choice compared to a singly linked list when time complexity is the most important factor and explain WHY. 3. Assuming each reference costs 1 byte, and each piece of data/info costs 1 byte as well. Which data structure (singly linked list, doubly linked list, or 300 element array list) will you use in the scenarios below if space cost is the most important while also having as good time performance as we can? Make sure to present your analysis in detail. a. we know nothing about potential size of the list c. b. we only know that the list won't go above 300 elements while we need to randomly access an element in the list. The list may go up to 300 elements. However, it is more likely that we will be working between 100 and 150 elements. d. The list may go up to 300 elements. The list is most likely to have less than 100 elements.One should be able to visit the previous element of a given item in the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
