🧮Brute Force
Also known as Brute-Force Search, Exhaustive Search
You try each possible answer in turn. You stop when one works.
Think of it like
Think of it like a big ring of keys. You try each key until one opens the door.
Example
Jack forgot his 3-digit bike lock code. Trying every code from 000 to 999 opens it in at most 1,000 tries.
Why it matters
It gives a right answer to test smart methods against. It is fine when the options are few.
Definition
Common mistake
Key takeaways
- 1Try everything. Until one works.
- 2Always correct. If it finishes.
- 3Grows fast. Count the options first.