Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Hydrosquall optimize unique chars#6

Open
hydrosquall wants to merge 2 commits intothundergolfer:masterthundergolfer/interview-with-python:masterfrom
hydrosquall:hydrosquall-optimize-unique-charshydrosquall/interview-with-python:hydrosquall-optimize-unique-charsCopy head branch name to clipboard
Open

Hydrosquall optimize unique chars#6
hydrosquall wants to merge 2 commits intothundergolfer:masterthundergolfer/interview-with-python:masterfrom
hydrosquall:hydrosquall-optimize-unique-charshydrosquall/interview-with-python:hydrosquall-optimize-unique-charsCopy head branch name to clipboard

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.