Problem 003 - #9
Open
nahallacman wants to merge 4 commits into
Open
nahallacman wants to merge 4 commits into
nahallacman wants to merge 4 commits into
Conversation
nahallacman
force-pushed
the
problem_003
branch
from
September 5, 2025 01:54
e188e5b to
d2ec54c
Compare
nahallacman
force-pushed
the
problem_003
branch
from
September 5, 2025 21:27
0b66228 to
90b5fba
Compare
I don't like my solution, it's memory inefficient and doesn't pass all cases... but it does work for the first two cases. Keep debugging.
This fixed the issue for the 3rd example string, but still needs a lot of work. It failed when using whitespace as part of the string which was a case I didn't consider. I added that as a test case, as well as a single character string, and will work on this again later when I have more time.
This passed a few more test cases, but still needs to work on more simple cases. Added another case that fails. The main key here was checking to see if the string has no repeats and then the longest length is just the full string length
I got many more cases handled, but this failed in a much later case where the string is much longer and complex.
nahallacman
force-pushed
the
problem_003
branch
from
September 16, 2025 01:15
90b5fba to
b101a63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't like my solution, it's memory inefficient and doesn't pass all cases... but it does work for the first two cases. Keep debugging.