原文链接: https://leetcode-cn.com/problems/repeated-dna-sequences 英文原文The DNA sequence is composed of a series of nucleotides abbreviated as 'A', 'C', 'G', and 'T'. For example, "ACGAATTCCG" is a DNA sequence. When studying DNA, it is useful to identify …
标签详情
滚动哈希 分类
原文链接: https://leetcode-cn.com/problems/maximum-length-of-repeated-subarray 英文原文Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays. Example 1: Input: nums1 = [1,2,3,2,1], nums2 = [3,2,1,4,7] O…
原文链接: https://leetcode-cn.com/problems/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. Return any duplicated substring that ha…
原文链接: https://leetcode-cn.com/problems/distinct-echo-substrings 英文原文Return the number of distinct non-empty substrings of text that can be written as the concatenation of some string with itself (i.e. it can be written as a + a where a is some string…
原文链接: https://leetcode-cn.com/problems/longest-chunked-palindrome-decomposition 英文原文You are given a string text. You should split it to k substrings (subtext1, subtext2, ..., subtextk) such that: subtexti is a non-empty string. The concatenation of a…
原文链接: https://leetcode-cn.com/problems/maximum-product-of-the-length-of-two-palindromic-substrings 英文原文You are given a 0-indexed string s and are tasked with finding two non-intersecting palindromic substrings of odd length such that the product of t…
原文链接: https://leetcode-cn.com/problems/longest-happy-prefix 英文原文A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself). Given a string s, return the longest happy prefix of s. Return an empty string "" if…
原文链接: https://leetcode-cn.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k 英文原文Given a binary string s and an integer k. Return true if every binary code of length k is a substring of s. Otherwise, return false. Example 1: Input: s …
原文链接: https://leetcode-cn.com/problems/longest-common-subpath 英文原文There is a country of n cities numbered from 0 to n - 1. In this country, there is a road connecting every pair of cities. There are m friends numbered from 0 to m - 1 who are travelin…
原文链接: https://leetcode-cn.com/problems/re-space-lcci 英文原文Oh, no! You have accidentally removed all spaces, punctuation, and capitalization in a lengthy document. A sentence like "I reset the computer. It still didn't boot!" became "iresetthecomputeri…