Longest Substring Without Repeating Characters

Medium
StringSliding WindowHash TableAmazonMeta
Given a string, print the length of the longest substring that contains no repeated characters. Input format: - One line: s

Constraints

0 <= s.length <= 2 * 10^5

Sample tests

Sample 1

Sample 2

Sign in to submit