Algorithms and Data Structures · Junior · Question 72 of 75
What does "brute force" mean for an algorithm?
- 1Rewriting the algorithm in a faster language
- ✓Correct answer: Trying all possible candidates and checking each one
- 3Using as many CPU cores as possible
Explanation
Brute force is usually the easiest correct solution and a good starting point in an interview. Then you look for repeated work to remove, for example with a hash map, sorting or two pointers.