Data structures Flashcards

1
Q

Array vs linked list

A

Statically/Dynamically allocated
Fast/slow retrieval
Fast/slow modification

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

allocation

A

space allocated at start vs space added when necessary

adjacent vs not adjacent

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

retrieval

A

addresses of all elements are known

addresses are unknown and has to be retrieved frpm previous node

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

modification

A

array recreated when modified with O(N) efficiency

array modified without recreating with O(1) efficiency

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

static vs dynamic 5

A
allocation
size
memory reuse
execution time
efficiency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

hash table properties

A

O(1) efficiency

key collisions

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

BST properties

A

O(log n)

natively maintain sorting order

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

freespace

A

System keeps track of the free disc blocks for allocating space to files when they are created.
To reuse the space released from deleting the files
The system maintains a free space list which keeps track of the disk blocks that are not allocated to some file or directory

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

Pre order traversal

A

Root left right

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

Post order

A

left right root

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