Fundamentals of Algorithms Flashcards
Algorithm
A sequence of steps designed to perform a particular task
Decomposition
Breaking down a problem into smaller sub-problems making the overall problem easier to solve
Abstraction
Including the necessary details and leaving out the unnecessary details when problem solving
add
+
subtract
-
divide
/
multiply
*
exponent
MOD
remainder
17 MOD 3 = 2
DIV
integer division
17 DIV 3 = 5
Variable
A variable is a location in memory in which you can temporarily store text or numbers
Sequence
the statements are executed in the order they are written in
Selection
the next step to be executed depends on whether the condition being tested is true or false
Iteration
the steps being repeated over and over again until the statement is true
Algorithm efficiency
A measure of how well an algorithm performs its task on a given data set