Breaking a complex problem down into smallerproblems.
What is an algorithm?
An algorithm is a set of instructions used to solve a problem.
What is abstraction?
Removing irrelevant details from a problem to reduce the complexity.
What is meant by algorithmic thinking?
Using logical steps to find a solution to a complex problem
One advantage of using a binary search over a linear search.
more efficient as it takes fewer steps for large lists of items.
One benefit of using an insertion sort over a merge sort on a computer.
The list doesn't split evenly so there is more than one way to get the right answer depending on how you split the items.
Purpose of a truth table?
It can convert one data type to another
Describe the steps for a binary search.
First
middlenumber
check if selected number is equal to / matches targetnumber
if searched number is larger, discard left half
Repeat until number found
or remaining list is of size 1 / 0 (number not found)
Describe the steps for a linear search?
Starting with the first value. Checking all values in order
What is an array?
An array is a static data structure that can hold a fixed number of data elements
Explain the different ways a program can be maintained.
Using subprograms to reuse code and make them easier to test. / Comments enable a programmer to understand the purpose of each line of code. / Appropriate variable names
What is a syntax error?
It is a mistake in the grammatical rules of the programming language, such as an incorrect spelling of a command word.
What is logical error?
A logic error is a mistake made by the programmer - the program runs without crashing but will display the wrong output.
What is a truth table?
Truth tables are used to show all possible inputs and the associated output for each input.