ArrayList Implementations Time Complexities Flashcards

1
Q

ArrayList: get/set

A

O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ArrayList: add/remove

A

O(1 + n-i)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ArrayStack: get/set

A

O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ArrayStack: add/remove

A

O(1 + n-i)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

RootishArrayStack: get/set

A

O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RootishArrayStack: add/remove

A

O(1 + n-i)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ArrayDeque: get/set

A

O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ArrayDeque: add/remove

A

O(1+min{i, n-i})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

DualArrayDeque: get/set

A

O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DualArrayDeque: add/remove

A

O(1+min{i, n-i})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

LinkedList: all

A

O(1+min{i, n-i})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DLList: all

A

O(1+min{i, n-i})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly