Software & Finance

Brute Force Search Algorithm

It is easy to implement and it is a a general problem-solving technique that consists of enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem's statement.


But it is an inefficient way of solving the problem.


Note that Big O Notation is: O(n!) - Solving Travelling Sales Man Problem with Brute-Force Search


Another example is solving eight queens puzzle on a chess board. A brute force approach would examine all possible arrangements of 8 queens in 64 squares so that it will not attack each other.