leetcode.cn 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
给你两个下标从 0 开始长度为 n 的整数排列 A 和 B 。 A 和 B 的 前缀公共数组 定义为数组 C ,其中 C[i] 是数组 A 和 B 到下标为 i 之前公共元素的数目。 请你返回 A 和 B 的 前缀公共数组 。 如果一个长度为 n 的数组包含 1 到 n 的元素恰好一次,我们称这个数组是一个长度为 n 的 排列 。 示例 1: 输入:A = [1,3,2,4], B = [3,1,2,4] 输出:[0,2,3,4] 解释:i = 0:没有公共元素,所以 C[0] = 0 。 i = 1:1…
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…
leetcode.com 2026-05-25
🟡1871.jump-game-vii
🏷️ Tags
#string #dynamic_programming #prefix_sum #sliding_window
🟡1871.jump-game-vii
🏷️ Tags
#string #dynamic_programming #prefix_sum #sliding_window
Telegraph
jump-game-vii
You are given a 0-indexed binary string s and two integers minJump and maxJump. In the beginning, you are standing at index 0, which is equal to '0'. You can move from index i to index j if the following conditions are fulfilled:
leetcode.cn 2026-05-30
🔴3161.block-placement-queries
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search
🔴3161.block-placement-queries
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search
Telegraph
block-placement-queries
有一条无限长的数轴,原点在 0 处,沿着 x 轴 正 方向无限延伸。 给你一个二维数组 queries ,它包含两种操作: