longest-substring-without-repeating-characters.sh — zsh
← list
normal view →
Longest Substring Without Repeating Characters
medium
Coin Change
Container With Most Water
Problem
Code
Results
Description
Language guide
strings
sliding-window
hashmap
Given a string
s
, find the length of the longest substring without repeating characters.
Examples
Example 1
Input:
s = "abcabcbb"
Output:
3
Example 2
Input:
s = "bbbbb"
Output:
1
Example 3
Input:
s = "pwwkew"
Output:
3
Read the step-by-step Longest Substring Without Repeating Characters solution & complexity analysis →
Python
JavaScript
Java
Go
Rust
C++
Ruby
Reset
Loading...
Testcase
Test Result
All cases
Case 1
Case 2
Case 3
🔒 5 hidden
Running will execute all 8 cases, including 5 hidden ones.