Time Complexities 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

Singly Linked List - Access

A

O(n)

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

Singly Linked List - Search

A

O(n)

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

Singly Linked List - Insertion

A

O(1)

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

Singly Linked List - Deletion

A

O(1)

17
Q

Doubly Linked List - Access

A

O(n)

18
Q

Doubly Linked List - Search

A

O(n)

19
Q

Doubly Linked List - Insertion

A

O(1)

20
Q

Doubly Linked List - Deletion

A

O(1)

21
Q

Hash Table - Access

A

Best Case with perfect hashing: O(1)

Worst Case: O(n)

22
Q

Hash Table - Search

A

O(1)

23
Q

Hash Table - Insertion

A

O(1)

24
Q

Hash Table - Deletion

A

O(1)

25
Q

Binary Search Tree - Access

A

O(log(n))

26
Q

Binary Search Tree - Search

A

O(log(n))

27
Q

Binary Search Tree - Insertion

A

O(log(n))

28
Q

Binary Search Tree - Deletion

A

O(log(n))