Brute Force
A Brute Force Algorithm Tries Everything
What is a Brute Force Algorithm?🦍
A Brute Force Algorithm tries every possible combination in a problem for a solution.

What's your pin number? 💳 🛍️ 🛒
A Brute Force algorithm tries every possible combination to guess a correct pin number
Brute Force a Pin Number
Assumptions:
Pin = Numbers = #
Pin = 4 Digits = ____
Start with 0000
Add 1 & Try Pin
Repeat
0000 -> 0001 -> 0002...9998 -> 9999
10,000 possible pin numbers
🔨In Computer Science a Brute Force solution is normally not the best solution but is a good starting point to get a deeper understanding of the problem.🔨
Last updated
Was this helpful?