Repository navigation
Add sliding-window cases to longest-substring #858
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2636,6 +2636,48 @@ | |
| "" | ||
| ], | ||
| "expected": 0 | ||
| }, | ||
| { | ||
| "label": "repeat in the middle of the stretch", | ||
| "input": [ | ||
| "dvdf" | ||
| ], | ||
| "expected": 3 | ||
| }, | ||
| { | ||
| "label": "left edge jumps more than one key", | ||
| "input": [ | ||
| "abccad" | ||
| ], | ||
| "expected": 3 | ||
| }, | ||
| { | ||
| "label": "longest stretch away from both ends", | ||
| "input": [ | ||
| "aabcdaa" | ||
| ], | ||
| "expected": 4 | ||
| }, | ||
| { | ||
| "label": "every key distinct", | ||
|
ye144440154 marked this conversation as resolved.
Resolved
ye144440154 marked this conversation as resolved.
Resolved
|
||
| "input": [ | ||
| "abc" | ||
| ], | ||
| "expected": 3 | ||
| }, | ||
| { | ||
| "label": "case and symbols count", | ||
| "input": [ | ||
| "aA 1" | ||
|
ye144440154 marked this conversation as resolved.
Resolved
|
||
| ], | ||
| "expected": 4 | ||
| }, | ||
| { | ||
| "label": "space before and after the keys", | ||
| "input": [ | ||
| " A!1 " | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trimming only one end still passes all eleven cases: |
||
| ], | ||
| "expected": 4 | ||
| } | ||
| ], | ||
| "paramNames": [ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.