Community

Start a Thread


Notifications
Subscribe You’re not receiving notifications from this thread.

Longest Substring With No Duplicate Characters (Main Thread)

Here is the interview question prompt, presented for reference.

Given a string of characters, can you find the longest substring of the string that has no repeating characters?

An example is shown below:

lengthOfLongestSubstring("abracadabar");
// 4 because it is 'brac'

Constraints

  • Length of the string <= 100000
  • The string will only contain lowercase letters
  • Expected time complexity : O(n)
  • Expected space complexity : O(1)

In this challenge, we'll discuss a simple but efficient method for finding the longest substring with no repeating characters.

You can see the full challenge with visuals at this link.

Challenges • Asked about 6 years ago by Jake from AlgoDaily

Jake from AlgoDaily Commented on Sep 06, 2018:

This is the main discussion thread generated for Longest Substring With No Duplicate Characters.