Question: 5. the List interface's get(i) and set(i,x) methods. When i is small (say 0 or 1), which of the following is true with regards to

5.

the List interface's get(i) and set(i,x) methods.

When i is small (say 0 or 1), which of the following is true with regards to asymptotic runtime?

choose:

a. the (doubly) LinkedList is faster than the ArrayDeque which is faster than the SkiplistList

b. the ArrayDeque is faster than the (doubly) LinkedList which is faster than the SkiplistList

c. the ArrayDeque and (doubly) LinkedList are equal, and faster than the SkiplistList

d. the ArrayDeque, (doubly) LinkedList, and SkiplistList are all equal

e. the ArrayDeque is faster than the SkiplistList, which is faster than the (doubly) LinkedList

6.

Consider the extra space required to store n elements in a List.

Which of the following is true with regards to asymptotic space?

choose:

a. the ArrayDeque uses less space than the (doubly) LinkedList which uses less space than the SkiplistList

b. the (doubly) LinkedList uses less space than the ArrayDeque which uses less space than the SkiplistList

c. the ArrayDeque uses less space than the SkiplistList, which uses less space than the (doubly) LinkedList

d. the ArrayDeque and (doubly) LinkedList are equal, and use less space than the SkiplistList

e. the ArrayDeque, (doubly) LinkedList, and SkiplistList are all equal with regards to space

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 Databases Questions!