Algorithms Flashcards
What’s Abstraction?
Abstraction is when you ignore unnecessary information and only focus on important facts.
It is used to simplify a problem to make it less complex. It also makes it more straightforward to understand and create a solution
What’s decomposition?
Decomposition is when you break down a problem into smaller tastes so that it is easier to solve
Each individual problem can be separately tested and solved.
It also enables different people to work on the different parts of a larger problem that can be later recombined to produce a full solution
What’s Algorithmic thinking?
Algorithmic thinking is the final stage as logical steps that are followed to solve the problem
The problem is broken down using decomposition into smaller problems. The required data and relevant structures are considered using abstraction
What is an algorithm?
An alrogithm is a set of instructions, presented in a logical sequence
What are the two main methods of defining algorithms?
Pseudocode and flowcharts
What is the start symbol in flowcharts?
Rectangle with rounded corners
what is the operation/process symbol in flowcharts?
rectangle
What is the decision (if statement) in flow charts?
Diamond
What is the input/output symbol in flowcharts?
slanted triangle
What is the symbol for the direction of flow in flowcharts?
arrow
Trace tables
Trace tables are used to track the value of variables as a program is run
They can be used to manually track the values in order to investigate why the program isn’t running as intended
What does each row in the trace table represent?
another iteration
What does each column in the trace table store?
the value of the variable as it changes