L4 + L5 - Algorithm Design Flashcards

1
Q

What are algorithms?

A
  • Order which the instructions are performed
    • Sequences
    • Decisions
    • Repetition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the flowchart for a decision?

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

What is the flowchart for repetition?

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

What are the different parts of algorithm design?

A
  1. Investigation
  2. Preliminary algorithm
  3. Refining the algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the first step in algorithm design?

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

What is the second step in algorithm design?

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

What is the third step in algorthm design?

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

What is pseudocode?

A
  • Written statements in english which resembles a programming language to describe the algorithm
  • No standard notation
  • Uses indentation to show instruction dependency on a selection or repetition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the pseudocode notation?

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

How would you represent functions like maths in pseudocode?

A
  • Do not call programming methods
  • Instead describe the function of those methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the rules of pseudocode?

A

Pseudocode must be

  • Correct
  • Consistent
  • Written in a form that can be understood by teammates
  • Clear and unambiguous
  • Can be implemented on the intended systems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give the psudocode for a loop

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