Longest Substring without Repeating Characters
Try to solve the Longest Substring without Repeating Characters problem.
Statement
Given a string, input_str
, return the length of the longest substring without repeating characters.
Constraints:
-
input_str.length
input_str
consists of English letters, digits, and spaces.
Examples
1 / 7
Understand the problem
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps us to check if you’re solving the correct problem:
Longest Substring Without Repeating Characters
1.
What should be the output if the following string is given as an input?
str = “conceptoftheday”
A.
8
B.
6
C.
5
D.
13
1 / 4
Figure it out!
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Try it yourself
Implement your solution in the following coding playground:
Python
usercode > main.py
def find_longest_substring(input_str):# Replace this placeholder return statement with your codereturn -1
Click "Run" to evaluate your code.
Longest Substring without Repeating Characters