Data Structures Flashcards

1
Q

Key features of a list?

A
  • dynamic
  • items can be changed and replaced (mutable)
  • can store more than one data type
  • ordered collection of items
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Key features of an array?

A
  • static
  • items can be changed or replaced (mutable)
  • can only store one data type
  • ordered collection of items
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Key features of a tuple?

A
  • static
  • items cannot be changed or replaced (immutable)
  • can store more than one data type
  • unordered collection of items
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a record?

A

A collection of different types of variables about one item

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

What is a linked list?

A

A static array containing both data and a pointer to the next item in the array. This means that list items can be stored anywhere in memory

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

What operations can be done on a linked list?

A

Add, delete, next(node), previous(node), traverse(through every item in the list)

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

What is a graph?

A

A set of vertices (nodes that have a value) and edges (links between nodes that can have values, and can either be directed or undirected)

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

What operations can be done on a graph?

A

Main ones are add, remove, add edge, remove edge, depth first search, breadth first search, pre order traversal, in order traversal, post order traversal

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

What is a tree?

A

A root node connected to other pointers with edges that are the root node’s descendants

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

What is a binary tree?

A

A special case of a tree where each nod has less than or equal to 2 descendants

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

What operations can be done on a tree?

A

Add, delete, binary search, pre, post and in order traversal, breadth first search, depth first search

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