Lists Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What data structure uses a linear list?

A

Array

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

What is meant by a linked list?

A

allow us to store items in whatever location is available

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

What is meant by a node?

A

an element of a list. It can hold many data items.

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

What is meant by a pointer?

A

A variable that stores an address of a node it is pointing to

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

What is meant by a null pointer?

A

A pointer that does not point to anything

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

What is meant by a StartPointer?

A

A variable that stores the address of the first element

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

How is a linked list modified?

A

By changing what the pointer. It copies into the new nodes pointer field the old content

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

Why are linked list used?

A

Real life applications (data is more than just a key field) and one data item. That is why linked lists are preferred over linear.

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

How do we reorder linked lists?

A

If we need to re-order a linked list, all we do is change the pointers that need to be moved.

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

What is a positive of using linked lists?

A

Saves time

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

What is the disadvantage of using linked lists?

A

Need more storage space for the pointer files

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

State the advantages of a binary tree

A

To allow people a faster search than a linear search or a searching a linked list as it is ordered.
Also when adding a new nod other nodes to not need to be moved, only a left or right pointer needs to be added to link the new node to an existing tree.

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

How can we store the binary tree?

A

In an array of records

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

What is a binary tree made up of?

A
A root node (start)
A parent or child node
A left subtree
A right subtree
Branches
Terminal node
How well did you know this?
1
Not at all
2
3
4
5
Perfectly