Algorithms Flashcards
What is Computational Thinking?
Computational Thinking is about the steps taken to find a solution to a complex problem. It involves Decomposition, Abstraction and Algorithmic Thinking.
What is Decomposition?
Decomposition is breaking down a complex problem down into smaller, more manageable and understandable problems and solving each one individually.
What is Abstraction?
Abstraction involves picking out the important bits of information from the problem and ignoring the specific details that don’t matter.
Abstraction helps in simplifying complex problems.
Define Algorithmic thinking.
Algorithmic Thinking is a logical way of getting from a problem to a solution. It involves defining a series of logical steps to solve a problem.
What is Pseudocode?
Pseudocode is a method of writing up a set of instructions for a computer program using plain English and can be easily followed by a coder. This is a good way of planning a program before coding.
What are benefits of Pseudocode?
- it can be quickly and easily converted into an actual programming language (because it’s similar)
- it is fairly easy to understand, even for non-programmers
- changes to the design can be incorporated quite easily
What are disadvantages of Pseudocode?
- It can be hard to see how a program flows
- It can be time consuming to produce
What are Flowcharts?
Diagrams that represent algorithms. Flowcharts use different shaped boxes for
different commands.
What are benefits of Flowcharts?
- It is easy to see how a program flows.
- Flow diagrams follow an international standard - it’s easy for any flow diagram user to pick up a diagram and understand it.
What are disadvantages of Flowcharts?
- with a large program, the diagrams can become huge in size and unwieldy to follow
-any changes to the design may mean a lot of the diagram has to be redrawn
What is the symbol for a process in Flowcharts?
Rectangle
What is the symbol for a input/output in Flowcharts?
Parallelogram
What is the symbol for a decision in Flowcharts?
Diamond
What is the symbol for a sub-program in Flowcharts?
Rectangle with two lines
What is the symbol for a terminal in Flowcharts?
Oval
What are Structure Diagrams?
A visual tool used to break down a complex problem into smaller, more manageable sub-problems
What are Trace Tables?
Trace tables are used to allow programmers to trace the value of variables as each line of code is executed.
What are Searching Algorithms?
Computers follow a search algorithm (step-by-step instructions) to find items in a list
What are the two types of Searching Algorithms?
Linear Search
Binary Search
What is a Linear search?
A Linear Search can be used on an unordered list. This type of search checks each item in turn and stops when it finds the item or reaches the end of the list.
What is a benefit of Linear Searches?
They will work on any data set, whether it is ordered or unordered.
What is a disadvantage of Linear Searches?
They can be quite inefficient, takes a lot of time for longer lists.
What is Binary Search?
A Binary Search looks for items in an ordered list. It constantly divides the list in half and searches the middle value until the required value is found. The list can contain letters, numbers or alphanumeric characters.
What is a benefit of Binary Searches?
It is a much more efficient algorithm than a linear search.