Reported interview periodNot available
Longest run of distinct characters
Given a string, measure the longest contiguous stretch in which no character repeats. Report only the length of that stretch.
Practice focusRequirements - The input is a single string, and the trailing newline is not part of the payload. - A stretch must be contiguous, and every character inside it must be distinct. - Return the length as a decimal string, not the slice itself and not its starting position. - Characters compare exactly, so an uppercase and a lowercase letter are different characters. - A string whose characters all match answers 1 , and the longest stretch may sit anywhere in the payload.…