About 420,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. Print the longest alphabetical substring using Python and for …

    Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your program should print Longest …

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

    Feb 2, 2024 · Use a For Loop and an If-Else Statement to Get the Longest Substring in Python. We will try to achieve the same scenario using the for loop. First, we will define the function …

  4. Longest Substring Without Repeating Characters – Python

    Dec 23, 2024 · The provided code defines a function length_of_longest_substring that takes a string s as input and returns the length of the longest substring without repeating characters. …

  5. Write a Python function that takes a string as input and returns …

    May 10, 2023 · Write a Python function that takes a string as input and returns the longest substring without repeating characters. If there are multiple longest substrings, the function …

  6. Python – Longest Substring Length of K - GeeksforGeeks

    May 16, 2023 · Given a String and a character K, find longest substring length of K. Explanation : b occurs twice, 2 > 1. Explanation : Maximum times c occurs is 3. Method #1: Using loop.

  7. 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 …

  8. Finding the longest substring without repeating characters: A …

    Dec 5, 2021 · Given a string s, find the length of the longest substring without repeating characters. Example: Input: s = "abcabcb" Output: 3 Explanation: The answer is "abc", with the …

  9. finding the longest substring in alphabetical order in Python

    Oct 26, 2013 · input_str = "cyqfjhcclkbxpbojgkar" length = len(input_str) # length of the input string iter = 0 result_str = '' # contains latest processed sub string longest = '' # contains longest sub …

  10. How can you find the longest substring without repeating …

    Finding the longest substring without repeating characters is a common problem in programming that can be solved efficiently using Python. The goal is to identify and return the length of the …

Refresh