Brute Force

When in doubt, use brute force. — Ken Thompson, Bell Labs

Thompson's advice has two aspects. The first is that some problems that are difficult for humans to solve because we are not quick at processing and are unreliable when doing repetitive operations, are easy for computers to solve because those weaknesses of ours are their strengths. In this sense he is advising us to play to the computer's strengths.

The second sense is that often we try to be too clever when solving problems and to overthink our solutions when simple brute force could get the job done.

We'll look at a few types of problems in this module that lend themselves to brute force solutions.