Find the length of the longest substring without repeating character

Given a string, our task is to find the length of the longest substring without repeating any character.
For example, the longest substring for "ABACDBFB" this string is "ACDBF" length of this string is 5.

This problem can be solved with O(N) time complexity where N is the length of the string.

Let's implement that:


Thank you so much for reading this article, if you like this question please share this with your friends who love programming. And if you have questions or feedback please drop a comment.

To solve more problems, please check out this article "Top 10 String Interview Questions".

All the Best!

Comments

Popular posts from this blog

Four Sum Problem (4sum) Solution in Java, Python, C++

Reverse Words in a Sentence Without using any Library