feat(content): more test cases
This commit is contained in:
@@ -9,6 +9,26 @@ categories:
|
||||
patterns:
|
||||
- sliding-window
|
||||
|
||||
function_signature: "def length_of_longest_substring(s: str) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "abcabcbb" }
|
||||
expected: 3
|
||||
- input: { s: "bbbbb" }
|
||||
expected: 1
|
||||
- input: { s: "pwwkew" }
|
||||
expected: 3
|
||||
hidden:
|
||||
- input: { s: "" }
|
||||
expected: 0
|
||||
- input: { s: " " }
|
||||
expected: 1
|
||||
- input: { s: "au" }
|
||||
expected: 2
|
||||
- input: { s: "dvdf" }
|
||||
expected: 3
|
||||
|
||||
description: |
|
||||
Given a string `s`, find the length of the **longest substring** without repeating characters.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user