Yahoo India Web Search

Search results

  1. People also ask

  2. Jul 9, 2024 · I am looking to find the longest length of a string of characters whose characters can only be replaced "k" number of times. So if we have "AABCCA" and k = 2, then the output would be 4, because at "AAAACA" i.e. changing "..BC.."

  3. Jul 4, 2024 · Explanation: The longest common substring is “abcdez” and is of length 6. Approach: Let m and n be the lengths of the first and second strings respectively. A simple solution is to one by one consider all substrings of the first string and for every substring check if it is a substring in the second string.

  4. Jul 3, 2024 · Join us in unraveling today's GeeksforGeeks Problem of the Day - "Longest repeating and non-overlapping substring" In this video, we dissect the problem, explore efficient algorithms,...

    • 19 min
    • FCodes
  5. Jul 4, 2024 · To solve this problem, we iterate over all substring lengths $l = 1 \dots n$. For every substring length $l$ we construct an array of hashes of all substrings of length $l$ multiplied by the same power of $p$. The number of different elements in the array is equal to the number of distinct substrings of length $l$ in the string. This number is ...

  6. Jul 19, 2024 · Given a string S consisting of N lowercase characters, the task is to find the length of the longest substring consisting of each vowel an even number of times Examples: Input: S= "bcbcbc"Output: 6Explanation:Consider the substring S[0, 5] i.e., "bcbcbc" is the longest substring because all vowels: a, e, i, o and u appear 0(which is even) number of

  7. diguage.github.io › leetcode › 1044-longestLeetCode 解题笔记

    Jul 11, 2024 · LeetCode - Longest Duplicate Substring Given a string S , consider all duplicated substrings : (contiguous) substrings of S that occur 2 or more times. (The occurrences may overlap.)

  8. Jul 12, 2024 · Let's start with the description for Longest Palindromic Substring: Given a string s, return the longest palindromic substring in s. For example: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer. Or: Input: s = "cbbd" Output: "bb".