2.1 algorithms Flashcards
1
Q
what is abstraction
A
only picking out necessary instructions from a problem and ignoring extra detail
2
Q
what is decomposition
A
breaking down a bigger problem into a smaller problem
3
Q
what is algorithmic writing
A
writing a clear set of instructions to follow
4
Q
what is start/stop in flowchart
A
circle/oval
4
Q
what is input/output in flowchart
A
parallelogram
5
Q
what is decision in flowchart
A
diamond
5
Q
what is instruction in flowchart
A
rectangle
6
Q
what is linear search
A
keep going through all values in list one by one until desired value is found
7
Q
what is binary search
A
- list needs to be sorted
- split list into half
- if desired value isnt middle value discard the side of list that does have desired value in it
- split new list
- keep repeating until desired value found
8
Q
what do sorts do
A
sort list in order
9
Q
advantages of bubble sort and insertion sort
A
- easy to writer code for
- simple to understand
10
Q
advantages for merge sort
A
much more efficient for longer lists