Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brute Force code #1

Open
BlackLotus opened this issue Dec 27, 2018 · 1 comment
Open

Brute Force code #1

BlackLotus opened this issue Dec 27, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@BlackLotus
Copy link

BlackLotus commented Dec 27, 2018

No I don't want the brute force code, but your code is inefficient in that it uses 3 tries to actually get the correct pin. You only have to test twice:

[1234, 5678, 1337]

And to test do:

[1234, 5678]

If one of the pins works

[1234]

If both pins were incorrect it is the third.

Yeah I know it's one request under hundreds/thousands, but I needed to get that out of my system.
Thanks for the source thought.

@martinvigo
Copy link
Owner

Great point! And thanks for bringing it up. If I make another update to the code I'll add your suggested fix

@martinvigo martinvigo added the enhancement New feature or request label Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants