1.Which algorithm(s) below are considered brute force? (Select all that apply) B
ID: 3144559 • Letter: 1
Question
1.Which algorithm(s) below are considered brute force? (Select all that apply)
Bubble Sort
Insertion Sort
Linear Search
Binary Search
2. True orFalse:
a.The halting problem is unsolvable and is proven so by contradiction.
b. There exists a set of problems that can be solved in polynomial time called Class P.
c. A greedy algorithm will always make the best choice at each step, rather than looking at the problem as a whole.
d.When using a 'binary search' to search an array, the array must be sorted.
a.Bubble Sort
b.Insertion Sort
c.Linear Search
d.Binary Search
Explanation / Answer
1. Bubble force and Linear search are considered as Brute force since they are straightforward approach, based directly on the problem’s statement and definitions of the concepts involved.
More information: Selection sort is also a Brute force.
2.
(a) It is TRUE. (factual)
(b) It is TRUE. ( example: Deterministic algorithms).
(c) It is TRUE. (That is what a reddy algorithm is!!)
(d) It is TRUE. (Binary search only works on a sorted array.)
Please do rate me and mention doubts, if any, in comments section.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.