1 Flashcards
1
Q
Decomposition (2)
A
- Breaking down a problem into more manageable parts that are easier to solve
- Different teams can work on different things + code can be reused
2
Q
Abstraction (1)
A
- Taking the basic details of a problem and representing them in a way the computer can understand
3
Q
Flowchart symbols: terminal (rounded box)
A
- Shows start and end of an algorithm
4
Q
Flowchart symbols: decision (diamond)
A
- Shows yes/no or true/false decisions where there are two possible outcomes
5
Q
Flowchart symbols: decision (diamond)
A
- Shows yes/no or true/false decisions where there are two possible outcomes
6
Q
Flowchart symbols: process (rectangle)
A
- Shows data processing e.g a calculation
7
Q
Flowchart symbols: subroutine (rectangle with lines)
A
- Shows a function or procedure that has its owns flowchart
8
Q
Flowchart symbols: line (arrow)
A
- Represents the code moving along
9
Q
Linear search
A
- The algorithm starts at the beginning of the list and moves through item by item or until it reaches the end of the list
10
Q
Best and worse case of linear search
A
- Best: the item is first term
- Worst: the item is the last term
Can take a very short/long time therefore inefficient - hight average case
11
Q
Binary search
A
- Selects the median and determines if the item is above or below. Continues this process
12
Q
Pros and cons of binary search
A
- Very efficient
- List needs to be in order therefore can take longer
13
Q
Bubble sort
A
- Starts at beginning of list and exmines first 2 items
14
Q
Merge sort
A
- Breaks a list into its component parts and then builds them up in the correct order