Data Structures Complexity Flashcards

1
Q

Array Access

A

O(1)

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

Array Search

A

O(N)

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

Array Insertion

A

O(N)

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

Array Deletion

A

O(N)

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

Stack Access

A

O(N)

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

Stack Search

A

O(N)

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

Stack Insertion

A

O(1)

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

Stack Deletion

A

O((1)

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

Queue Access

A

O(N)

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

Queue Search

A

O(N)

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

Queue Insertion

A

O(1)

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

Queue Deletion

A

O(1)

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

Linked List Access

A

O(N)

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

Linked List Search

A

O(N)

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

Linked List Insertion

A

O(1)

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

Linked List Deletion

A

O(1)

17
Q

Hash Table Access

A

O(1)

18
Q

Hash Table Search

A

O(1)

19
Q

Hash Table Insertion

A

O(1)

20
Q

Hash Table Deletion

A

O(1)

21
Q

Binary Search Tree Access

A

O(logN)

22
Q

Binary Search Tree Search

A

O(logN)

23
Q

Binary Search Tree Insertion

A

O(logN)

24
Q

Binary Search Tree Deletion

A

O(logN)

25
Q

Hash Table Search WORST Case

A

O(N)

If all items are at same address

26
Q

Hash Table Insertion WORST Case

A

O(N)

Resizing

27
Q

Hash Table Deletion WORST Case

A

O(N)

If all elements are at same address

28
Q

Binary Search Tree Access WORST Case

A

O(N)

If unbalanced tree with all left or all right nodes

29
Q

Binary Search Tree Search

WORST Case

A

O(N)

If unbalanced tree with all left or all right nodes

30
Q

Binary Search Tree Insertion WORST Case

A

O(N)

If unbalanced tree with all left or all right nodes

31
Q

Binary Search Tree Deletion WORST Case

A

O(N)

If unbalanced tree with all left or all right nodes