About 1,540,000 results
Open links in new tab
  1. Python Program To Find Length Of The Longest Substring

    Dec 20, 2021 · Given a string str, find the length of the longest substring without repeating characters. For “ABDEFGABEF”, the longest substring are “BDEFGA” and "DEFGAB", with …

  2. finding the longest substring in alphabetical order in Python

    Oct 26, 2013 · def longest_substring(string): curr, subs = '', '' for char in string: if not curr or char >= curr[-1]: curr += char else: curr, subs = '', max(curr, subs, key=len) return max(curr, subs, …

  3. Longest Substring Without Repeating Characters in Python

    Nov 10, 2024 · In Python, by using different methods we can find the longest substring without repeating characters, such as by using the Brute force approach which involves checking all …

  4. How to Get Longest Substring Without Repeating Characters in Python

    Feb 2, 2024 · The longest substring method is very helpful if we want to get the longest substring that does not repeat the same alphabets. In this method, we will use a loop that goes through …

    Missing:

    • Program

    Must include:

  5. 5 Best Ways to Find the Length of the Longest Substring with

    Mar 10, 2024 · A compact solution can be created using Python’s list comprehension and set, although it’s not the most efficient. This one-liner relies on generating all substrings and …

    Missing:

    • Program

    Must include:

  6. Python - Longest Substring Length of K - GeeksforGeeks

    May 16, 2023 · Given a String and a character K, find longest substring length of K. Input: test_str = 'abcaaaacbbaa', K = b Output: 2 Explanation: b occurs twice, 2 > 1. Input: test_str = …

  7. python - How can I search for longest substring in a more …

    Oct 25, 2021 · I'm trying to search for the longest substring in a string, in linear time. How can I do this without using the max function? This is the question: Given a string, find the length of the …

    Missing:

    • Program

    Must include:

  8. Python: How to Find Longest Substring without Repeating …

    May 14, 2024 · In this tutorial, we’ll explore an easy and efficient solution to the “Longest Substring Without Repeating Characters” problem using Python. This problem requires finding …

    Missing:

    • Program

    Must include:

  9. How to find longest substring without repeating characters in Python?

    Oct 12, 2022 · Given a string s, find the longest substring without repeating characters. A substring is a smaller string that fits on top of a string like each puzzle piece inside the whole …

    Missing:

    • Program

    Must include:

  10. Python – Extract K length substrings - GeeksforGeeks

    Jan 15, 2025 · Let's explore various methods to extract substrings of length k from a given string in Python. List comprehension is the most efficient and concise way to extract substrings. It …

  11. Some results have been removed
Refresh