3.2 Writing and Following algorithms Flashcards

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

Algorithm

A

An algorithm is a set of instructions so solve a problem or complete some well-defined task in a finite number of steps

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

Different types of problems solve by algorithms

A
  • Routing
  • Timetabling
  • Searching
  • Encrypting
  • Sorting
  • Writing a compiler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Features of good algorithms

A
  • Has clear and precisely stated steps that produce the correct output for any set of valid inputs
  • Should allow for invalid inputs
  • Must always terminate at some point
  • Should perform the task efficiently, in as few steps as possible
  • Should be designed in such a way that other people will be able to understand it and modify if it necessary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pseudocode

A

Halfway house between english statements and a program code

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

Bubble sort

A

Swaps items in different passes

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

Binary search

A

Must be sorted (divide and conquer)

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

Features of a good program

A

Comments to document

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

What are some good ways to follow an algorithm?

A

Create a trace table with columns for each variable in the order in which they appear in the program and a column for the output, follow through the algorithm line by line and fill in the value of a variable whenever it changes

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

Internet related algorithms

A

Algorithms that are used to manage and manipulate huge amounts of data stored on the internet

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

Route-finding algorithms

A

Used to determine the best possible route to transmit packets of data from point A to point B over a network

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

Compression algorithms

A

Used to compress data files so that they can be transmitted faster or held in a smaller amount of storage space

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

Encryption algorithms

A

Encrypts client to user data connections

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