Skip to content

Problem 003 - #9

Open
nahallacman wants to merge 4 commits into
mainfrom
problem_003
Open

nahallacman wants to merge 4 commits into
mainfrom
problem_003

Conversation

@nahallacman

Copy link
Copy Markdown
Owner

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.

@nahallacman nahallacman changed the title First pass at this. Problem 003 Sep 5, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant