Problem · String
Longest Substring Without Repeating Characters
Learn this problemProblem statement
Return the length of the longest contiguous substring of s whose characters are all distinct.
Function
lengthOfLongestSubstring(s: String) → intExamples
Example 1
s = "abcabcbb"return = 3"abc" is a longest substring with no repeated character.
Constraints
0 <= s.length <= 200000scontains printable ASCII characters.
More Atlassian problems
- Planning ProductionOA · Seen Feb 2025
- K-Means ClusteringOA · Seen Feb 2025
- Minimum Sorted Erasure OperationsOA · Seen Jun 2024
- Count Analogous ArraysOA · Seen Mar 2024
- Get Maximum ScoreOA · Seen Mar 2024
- Better Compression 🦀OA · Seen Mar 2024
- Romanizer 🐡OA · Seen Mar 2024
- Flower Bouquets 💐OA · Seen Mar 2024