Problem solving: Unit 2-3 Flashcards
1
Q
- What are the two types of algorithms?
A
- sorting algorithms.
- searching algorithms.
2
Q
What is a construct?
A
- a smaller part from which something is built.
3
Q
- What are the two sorting algorithms?
A
- bubble sort.
- merge sort.
4
Q
- what is traversal?
A
- travel across or through something.
5
Q
-what is recursion?
A
- a process that is repeated.
6
Q
- what is brute force?
A
- an algorithm design that does not include any techniques to improve performance, but instead relies on computing power to try all possibilities until the solution to a problem is found.
7
Q
- what is divide and conquer?
A
- an algorithm design that works by dividing a problem into smaller and smaller sub-problems, until they are easy to solve, the solution are then combined to give a solution to the complete problem.
8
Q
- what are the two searching algorithms?
A
- linear search.
- binary search.
9
Q
What is iteration?
A
- a construct that means a process is repeated. An action is repeated until a condition is met or a particular outcome is reached.
10
Q
What is selection?
A
- a construct that allows a choice to be made between different alternatives.
11
Q
Compare binary search and linear search?
A
- binary search is more efficient, wheras linear search will have multiple comparisons to be made.
- ## binary search must be conducted in a sorted list, wheras linear search could be done in an unsorted list
12
Q
What is the limitation of Merge Sort? Bubble Sort?
A
limitation of merge sort is that it diffcult to code than, while bubble sort is more time consuming.