Section 2 Chapter 9 - Writing and Interpreting Diagrams Flashcards

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

Properties of a good algorithm (5)

A
  • Clear and precisely stated steps that produce a correct output
  • Should allow for invalid inputs
  • Must always terminate at some point
  • Execute efficiently in as few steps as possible
  • It should be designed in a way that is understandable and can be easily modifed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Common types of algorithm (4)

A
  • Internet related
  • Route finding
  • Compression
  • Encryption
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Internet related algorithm

A

Can be used to manage and manipulate huge amounts of data stored on the Internet e.g. a search engine

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

Route finding algorithm

A

Finds the shortest route between two points for instance the fastest driving route or the best route to transmit packets over a network

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

Compression algorithm

A

Used to reduce the file space taken up by a file while still ideally retaining most of the relevant information

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

Encryption algorithm

A

Hides information so that it can only be read by the sender and receiver and not a third party

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

Binary search algorithm

A

1 - Check the value in the middle
2 - If larger than target, delete the second half of the list, if smaller delete the first half of the list
3 - Repeat steps 1 and 2 until the target is found

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

Sorting algorithm

A

Puts an unordered list in order

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

Bubble sort algorithm

A

1 - Loop through the array swapping each pair of values that are in the wrong order
2 - Repeat (length of list) time, reducing the number of elements to be examined by 1 each time

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

Tips for interpreting algorithms (4)

A
  • Read the comments
  • Look at the variable names
  • Follow the steps in the program
  • Try a “dry run” with some test data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly