Paper 2 Key Bits Flashcards
What is Decomposition?
Breaking complex problem down into smaller problems and solving each one individually
What is Abstraction?
Picking out important bits of info from problem, ignoring specific details that dont matter
What is Algorithmic Thinking?
Logical way of getting from problem to solution
What is a algorithm?
Set of instructions for solving a problem
What type of box is a start/stop?
Box with rounded corners
What type of box is a Input/Output?
Parallelogram Box
What type of box is a Processes?
Rectangle Box
What type of box is a Decision?
Diamond box
How does a binary search work?
- Find the middle item
- If the item you are looking for is smaller than middle item, get rid of first half of list, and vis versa
- Continue steps 1 and 2 until found
What does a binary search work on?
A ordered list
How does a linear search work?
- Checks each element one by one
- If element is not the one it needs, it will move onto the next one
How does a bubble sort work?
- Compares elements next to each other
- Puts the highest value ontop
How does a merge sort work?
- Splits list in half
- Repeat step 1 until all lists contain 1 item
- Merge the pairs in the right order
- Repeat step 3 until all sub-lists together
What is a Insertion Sort?
- Look at 2nd item in list
- Compares all items before it and inserts it into correct place
- Step 2 repeated until it in correct place
What are the pros and cons of a linear search?
Pro: Simple
Con: Takes time