Data Structures Flashcards

1
Q

Array

A

A fixed size contiguous block of memory to store elements of the same data type

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

Linked List

A

A linear data structure that consists of a series of nodes connected by pointers

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

Queue

A

A linear data structure that follows the principle of First In First Out (FIFO)

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

Stack

A

A linear data structure that follows the principle Last In First Out (LIFO)

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

Hash Map

A

An unordered collection of data that stores elements in key-value pairs

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

Tree

A

Nonlinear hierarchical data structure that consists of nodes connected by edges

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

Binary Tree

A

A tree where each node can have at most two children

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

Full Binary Tree

A

A binary tree where every node has either two children or none

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

Perfect Binary Tree

A

Binary tree where every parent has two children nodes and all the leaf nodes are on the same level

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

Degenerate / Pathological Tree

A

Binary tree where each parent has one child

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

Skewed Binary Tree

A

A degenerate / pathological tree but with all left nodes or all right nodes

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

Balanced Binary Tree

A

Binary tree where the difference between the height of the left sub tree and the right subtree for each node is either 0 or 1

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

Array Insert Time Complexity

A

O(n)

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

Array Insert (at the end) Time Complexity

A

O(1)

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

Array Delete Time Complexity

A

O(n)

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

Array Delete (at the end) Time Complexity

17
Q

Max Heap

A

A complete binary tree where every node is always greater than its child node(s)

18
Q

Min Heap

A

A complete binary tree where every node is always smaller than its child node(s)

19
Q

Array Access Time Complexity

20
Q

Array Search Time Complexity

21
Q

Linked List Access Time Complexity

22
Q

Linked List Search Time Complexity

23
Q

Linked List Insert (at position) Time Complexity

24
Q

Linked List Delete (at position) Time Complexity

25
Stack Search Time Complexity
O(n)
26
Stack Insert (Push) Time Complexity
O(1)
27
Stack Delete (Pop) Time Complexity
O(1)
28
Queue Search Time Complexity
O(n)
29
Queue Insert (Enqueue) Time Conplexity
O(1)
30
Queue Delete (Dequeue) Time Complexity
O(1)