cramcards mod5 Flashcards

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

decomposition

A

breaking down into smaller problems and solving each individually

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

abstraction

A

picking out important bits

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

algorhythmic thinking

A

steps it takes to solve a problem can be used to solve another one in future

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

flowchart boxes

A

start/stop - rounded corners
input/output - paralellogram
processes - rectangles
decision - diamond

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

binary search

A

1) find middle item
2) if its the item you’re looking for stop
3) if not, compare item to the middle term. if above, eliminate below vice versa
4) get middle of lower half
5) repeat

can only look in ordered list

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

linear search

A

1) look at first item
2) if its correct stop
3) if not look at next item
4) repeat

can look in unordered lists

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

bubble sort

A

1) look at first two items
2) if in right order move on, if in wrong order swap them
3) move on and repeat process
4) keep doing this until all are in correct place

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

merge sort

A

1) split list in half (second sub starts middle term)
2) repeat until all sublists are 1
3) merge sublists so each has twice as many items
4) repeat until all sublists together

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

bubble sort pros cons

A

simple
efficient for checking if in right order
doesn’t use much memory

inefficient way to sort
not cope with large list

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

merge sort pros cons

A

efficient
consistent running time

slower for small lists
goes through process even if sorted
uses more memory

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

insertion sort

A

1) look at second item
2) compare to all numbers before
3) if not in right place insert into right place
4) repeat until done

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