Data Structures Flashcards

1
Q

Features of an array

A
Fixed size(static)
All items must be of same data type
Fixed number of items
Can have 1 or more dimensions
Can hold an item of the other two structures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Features of tuples?

A

Number of items may grow or shrink
Items may be of different data types
a tuple is immutable-data cannot be modified

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

Features of records?

A

Fixed number of items

Items may be of different data types of record is accessed through an attribute

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

What is a list?

A

An ordered data structure
A list is accessed through an index
The index indicates the position of the data in the list

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

What are stacks?

A

LIFO structure
PUSH command to insert data
POP command to remove data
two pionter

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

What are queues?

A

FIFO structure
PUSH command to insert data
POP command to remove data

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

Define linked list?

A

Unordered data structure that uses pointers to sort data
Linked lists use pointers to sort data by pointing at the next item in the list. They use a start pointer and an end pointer that usually points to 0 or null. Linked lists can have multiple sets of pointers. Linked lists can have multiple sets of pointers to sort data on various attributes

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

What are binary trees?

A

Tree structure where each node can only have two branches left and right

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

What are graphs?

A

A collection of data nodes with connections between them
The graph may be directed or undirected
The graph may be weighted or unweighted
The graph may be directed or undirected

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

What is depth-first traversel?

A

Uses a stack to store visited nodes

Visit all nodes attached to anode connected to a starting node before visiting a second node attached to a starting node

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

What is breath-first traversel?

A

Uses a queue to store the visited nodes

Visit all nodes attached directly to a starting node first

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

What are hash tables?

A

Hash tables are used to access data that is stored in a more random manner. Each item maps to an address in a table containing data about that item.

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

Binary trees:

Preorder?

A

RLN

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

Binary trees:

Inorder?

A

LNR

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

Binary trees:

Postorder?

A

LRN

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

What is hashing?

A

A method for creating random access to stored data