Comp Flashcards

(4 cards)

1
Q

Describe purpose of truth table

A

To show all possible inputs and appropiate outputs

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

Describe steps of binary search

A

-Split through midpoint of number see if number match
-if not check number which is larger or smaller
-discard the side with the wrong number sizes
- repeat until match found

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

How to improve maintainabmoty

A

Add comments, sensible variable name, add indentations, use decomposition, debugging

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

Difference between insertion and merge sort

A

Insertion starys woth smallest value as first index value whereas merge sort places the smallest pairs of items in the smallest indexes

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