Interview glossary / Technical rounds
Brute-force solution
Also called: Naive solution · Brute force
The straightforward approach that tries every possibility. Usually too slow for the final answer, but a useful first step in an interview.
Describing the brute-force approach first shows you understand the problem and gives a correct baseline. Then you can look for what it repeats or wastes, which often points to the better solution.
In an interview
Say the brute-force approach and its complexity in a sentence, then improve on it. If time is short, a working brute-force solution beats an unfinished clever one.