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: MEDIUM. Variant: 17. Favor a pragmatic solution that is easy to ship, read, and adapt.
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 medium difficulty.
The signed-in workspace provides the tools required by the round, such as recording, code execution, diagrams, structured notes, or evidence p