leetcode.com 2026-05-20
🟡2657.find-the-prefix-common-array-of-two-arrays
🏷️ Tags
#bit_manipulation #array #hash_table
🟡2657.find-the-prefix-common-array-of-two-arrays
🏷️ Tags
#bit_manipulation #array #hash_table
Telegraph
find-the-prefix-common-array-of-two-arrays
You are given two 0-indexed integer permutations A and B of length n. A prefix common array of A and B is an array C such that C[i] is equal to the count of numbers that are present at or before the index i in both A and B. Return the prefix common array…
leetcode.cn 2026-05-21
🟡3043.find-the-length-of-the-longest-common-prefix
🏷️ Tags
#trie #array #hash_table #string
🟡3043.find-the-length-of-the-longest-common-prefix
🏷️ Tags
#trie #array #hash_table #string
Telegraph
find-the-length-of-the-longest-common-prefix
给你两个 正整数 数组 arr1 和 arr2 。 正整数的 前缀 是其 最左边 的一位或多位数字组成的整数。例如,123 是整数 12345 的前缀,而 234 不是 。 设若整数 c 是整数 a 和 b 的 公共前缀 ,那么 c 需要同时是 a 和 b 的前缀。例如,5655359 和 56554 有公共前缀 565 和 5655,而 1223 和 43456 没有 公共前缀。 你需要找出属于 arr1 的整数 x 和属于 arr2 的整数 y 组成的所有数对 (x, y) 之中最长的公共前缀的长度。…
leetcode.com 2026-05-21
🟡3043.find-the-length-of-the-longest-common-prefix
🏷️ Tags
#trie #array #hash_table #string
🟡3043.find-the-length-of-the-longest-common-prefix
🏷️ Tags
#trie #array #hash_table #string
Telegraph
find-the-length-of-the-longest-common-prefix
You are given two arrays with positive integers arr1 and arr2. A prefix of a positive integer is an integer formed by one or more of its digits, starting from its leftmost digit. For example, 123 is a prefix of the integer 12345, while 234 is not. A common…