Algorithms Flashcards

1
Q

What is an algorithm?

A

A finite sequence of operations for carrying out a procedure or solving a problem.

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

3 characteristics of algorithms

A
  • must be UNAMBIGUOUS i.e. person or machine running the algorithm should not have to make choices
  • must be DETERMINISTIC i.e. no chance of randomness involved
  • must be FINITE i.e. must end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Big O Notation

A
  • it represents the complexity of the algorithm and how it scales up
  • it describes the worst case scenario
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean if one algorithm has a higher order of complexity than another?

A

it will have a longer run time

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