Algorithm : Longest Substring Without Repeating Characters
Algorithm : Longest Substring Without Repeating Characters Problem Statement: Given a string, find the length of the longest substring without repeating characters. This question can be found in leetcode #3. Example: if the input string is "sreenath", then the output should be: 5 Reason\Explanation: sre - First three characters, until the next e. - 3 re. - we move the next substring which is re until - 2 since no words can be formed using starting with ee. -0 enath - with no repeating characters. - 5 As you can see that the maximum number of characters is 5. Logic: Sliding Window Technique: We have a window just like how you have a Window at home, if you want to open the window fully, you basically slide the window to the fullest. If you have t...