Yahoo India Web Search

Search results

  1. Longest Substring Without Repeating Characters - Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3.

  2. Apr 15, 2024 · Given a string str, find the length of the longest substring without repeating characters. Example: Example 1: Input: “ABCDEFGABEF”. Output: 7. Explanation: The longest substring without repeating characters are “ABCDEFG”, “BCDEFGA”, and “CDEFGAB” with lengths of 7. Example 2: Input: “GEEKSFORGEEKS”. Output: 7.

  3. Oct 4, 2023 · Print Longest substring without repeating characters. Last Updated : 04 Oct, 2023. Given a string, print the longest substring without repeating characters. For example, the longest substrings without repeating characters for “ABDEFGABEF” are “BDEFGA” and “DEFGAB”, with length 6.

  4. Jan 8, 2024 · In this tutorial, compare ways to find the longest substring of unique letters using Java. For example, the longest substring of unique letters in “CODINGISAWESOME” is “NGISAWE”. 2. Brute Force Approach. Let’s start with a naive approach.

  5. Longest Substring Without Repeating Characters. Table of Contents. Problem. Given a string s, find the length of the longest substring without repeating characters. Example 1 : Input: s = "abcabcbb" Output: 3. Explanation: The answer is "abc", with the length of 3. Example 2 : Input: s = "bbbbb" Output: 1.

  6. Mar 16, 2012 · Given a string S of length N find longest substring without repeating characters. Example: Input: "stackoverflow" Output: "stackoverfl" If there are two such candidates, return first from left...

  7. Explanation: The longest substring without repeating characters is "issi," with a length of 4. Approach: Using Sliding Window in O(n3) time. The Sliding Window approach, used to find the longest substring without repeated characters in O(n^3) time, involves moving a window through the text to check for substrings. Algorithm:

  1. People also search for