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

Hydrosquall optimize unique chars #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hydrosquall
Copy link
Contributor

Hey,

Sorry I goofed in the previous PR #5 !

There are 256, not 255 ASCII characters. The classic CS "off-by-one" error strikes again!

Was thinking about this problem recently, so added a small constraint that avoids checking strings that must have duplicates by virtue of the fact that they are too long.

Alternately, if it would be best to code up a separate solution in a different file, I could do that too.
There are 256, not 255 characters

The classic CS off-by-one error strikes again
@thundergolfer thundergolfer self-assigned this May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants