Strings and window state: Given a string s, return the length of its longest contiguous substring containing no repeated characters.
Input: A JSON object { "s": string }.
Output: A JSON integer representing the maximum substring length.
Constraints:
- 0 <= s.length <= 100000
- Compare characters case-sensitively
- The empty string returns 0
Read one JSON value from stdin and print exactly one JSON-serialized answer to stdout with no extra text.
Difficulty: EASY. Variant: 1. Expect follow-up questions about complexity, edge cases, and alternative approaches.
Practice context
This coding (algo) exercise trains prompt interpretation, explicit assumptions, a concrete response, and a concise explanation of the decisions made. It is marked easy difficulty.
The signed-in workspace provides the tools required by the round, such as recording, code execution, diagrams, structured notes,