algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

understand and explain algorithms

A

à sequence of steps that can be followed to complete à task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

explain decomposition

A

breaking a problem into a number of sub problems to accomplish à task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

abstraction

A

process of removing unnecessary detail from à problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how are some algorithms more efficient the others

A

time it takes to run a particular algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

linear search algorithms

A

simpler then binary but less efficient
run time is similar
checks each item of the list to find the correct one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

binary search algorithm

A

finding the middle item in à less and seeing whether the item is greater or less then the middle number
the takes out the lower/upper half of the list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

bubble sort algorithm

A

used to sort an unordered list of items
check each pair of numbers to see if in right position otherwise swap them around
1 +2, 2+3, 3+4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

bubble sort advantages and disadvantages

A

advantages
simple algorithm
efficient way to check if a list is in order
does use memory ask much

disadvantages
inefficient way to sort a list
slow for a large list of items

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

merge sort algorithm

A

sorts list apart and then merged them together
split list in half until only one item in all list
merge pairs of sub lists and sort items into right order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

merge sort pros and cons

A

pros
more efficient to sort for larger list
similar running time is
consistent running time

cons
if the list is already sorted it goes through the whole process again
uses more memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly