leetcode.cn 2025-07-30
🟡2419.longest-subarray-with-maximum-bitwise-and
🏷️ Tags
#bit_manipulation #brainteaser #array
🟡2419.longest-subarray-with-maximum-bitwise-and
🏷️ Tags
#bit_manipulation #brainteaser #array
Telegraph
longest-subarray-with-maximum-bitwise-and
给你一个长度为 n 的整数数组 nums 。 考虑 nums 中进行 按位与(bitwise AND)运算得到的值 最大 的 非空 子数组。
leetcode.com 2025-07-30
🟡2419.longest-subarray-with-maximum-bitwise-and
🏷️ Tags
#bit_manipulation #brainteaser #array
🟡2419.longest-subarray-with-maximum-bitwise-and
🏷️ Tags
#bit_manipulation #brainteaser #array
Telegraph
longest-subarray-with-maximum-bitwise-and
You are given an integer array nums of size n. Consider a non-empty subarray from nums that has the maximum possible bitwise AND.
leetcode.com 2025-07-31
🟡898.bitwise-ors-of-subarrays
🏷️ Tags
#bit_manipulation #array #dynamic_programming
🟡898.bitwise-ors-of-subarrays
🏷️ Tags
#bit_manipulation #array #dynamic_programming
Telegraph
bitwise-ors-of-subarrays
Given an integer array arr, return the number of distinct bitwise ORs of all the non-empty subarrays of arr. The bitwise OR of a subarray is the bitwise OR of each integer in the subarray. The bitwise OR of a subarray of one integer is that integer. A subarray…
leetcode.cn 2025-08-03
🔴2106.maximum-fruits-harvested-after-at-most-k-steps
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
🔴2106.maximum-fruits-harvested-after-at-most-k-steps
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
Telegraph
maximum-fruits-harvested-after-at-most-k-steps
在一个无限的 x 坐标轴上,有许多水果分布在其中某些位置。给你一个二维整数数组 fruits ,其中 fruits[i] = [positioni, amounti] 表示共有 amounti 个水果放置在 positioni 上。fruits 已经按 positioni 升序排列 ,每个 positioni 互不相同 。 另给你两个整数 startPos 和 k 。最初,你位于 startPos 。从任何位置,你可以选择 向左或者向右 走。在 x 轴上每移动 一个单位 ,就记作 一步 。你总共可以走 最多…
leetcode.com 2025-08-03
🔴2106.maximum-fruits-harvested-after-at-most-k-steps
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
🔴2106.maximum-fruits-harvested-after-at-most-k-steps
🏷️ Tags
#array #binary_search #prefix_sum #sliding_window
Telegraph
maximum-fruits-harvested-after-at-most-k-steps
Fruits are available at some positions on an infinite x-axis. You are given a 2D integer array fruits where fruits[i] = [positioni, amounti] depicts amounti fruits at the position positioni. fruits is already sorted by positioni in ascending order, and each…
leetcode.com 2025-08-05
🟢3477.fruits-into-baskets-ii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set #simulation
🟢3477.fruits-into-baskets-ii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set #simulation
Telegraph
fruits-into-baskets-ii
You are given two arrays of integers, fruits and baskets, each of length n, where fruits[i] represents the quantity of the ith type of fruit, and baskets[j] represents the capacity of the jth basket. From left to right, place the fruits according to these…
leetcode.cn 2025-08-06
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
Telegraph
fruits-into-baskets-iii
给你两个长度为 n 的整数数组,fruits 和 baskets,其中 fruits[i] 表示第 i 种水果的 数量,baskets[j] 表示第 j 个篮子的 容量。
leetcode.com 2025-08-06
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
Telegraph
fruits-into-baskets-iii
You are given two arrays of integers, fruits and baskets, each of length n, where fruits[i] represents the quantity of the ith type of fruit, and baskets[j] represents the capacity of the jth basket. From left to right, place the fruits according to these…
leetcode.cn 2025-08-07
🔴3363.find-the-maximum-number-of-fruits-collected
🏷️ Tags
#array #dynamic_programming #matrix
🔴3363.find-the-maximum-number-of-fruits-collected
🏷️ Tags
#array #dynamic_programming #matrix
Telegraph
find-the-maximum-number-of-fruits-collected
有一个游戏,游戏由 n x n 个房间网格状排布组成。 给你一个大小为 n x n 的二维整数数组 fruits ,其中 fruits[i][j] 表示房间 (i, j) 中的水果数目。有三个小朋友 一开始 分别从角落房间 (0, 0) ,(0, n - 1) 和 (n - 1, 0) 出发。
leetcode.com 2025-08-07
🔴3363.find-the-maximum-number-of-fruits-collected
🏷️ Tags
#array #dynamic_programming #matrix
🔴3363.find-the-maximum-number-of-fruits-collected
🏷️ Tags
#array #dynamic_programming #matrix
Telegraph
find-the-maximum-number-of-fruits-collected
There is a game dungeon comprised of n x n rooms arranged in a grid. You are given a 2D array fruits of size n x n, where fruits[i][j] represents the number of fruits in the room (i, j). Three children will play in the game dungeon, with initial positions…
leetcode.com 2025-08-08
🟡808.soup-servings
🏷️ Tags
#math #dynamic_programming #probability_and_statistics
🟡808.soup-servings
🏷️ Tags
#math #dynamic_programming #probability_and_statistics
Telegraph
soup-servings
You have two soups, A and B, each starting with n mL. On every turn, one of the following four serving operations is chosen at random, each with probability 0.25 independent of all previous turns: