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:
leetcode.com 2025-08-10
🟡869.reordered-power-of-2
🏷️ Tags
#hash_table #math #counting #enumeration #sorting
🟡869.reordered-power-of-2
🏷️ Tags
#hash_table #math #counting #enumeration #sorting
Telegraph
reordered-power-of-2
You are given an integer n. We reorder the digits in any order (including the original order) such that the leading digit is not zero. Return true if and only if we can do this so that the resulting number is a power of two. Example 1: Input: n = 1 Output:…
leetcode.cn 2025-08-11
🟡2438.range-product-queries-of-powers
🏷️ Tags
#bit_manipulation #array #prefix_sum
🟡2438.range-product-queries-of-powers
🏷️ Tags
#bit_manipulation #array #prefix_sum
Telegraph
range-product-queries-of-powers
给你一个正整数 n ,你需要找到一个下标从 0 开始的数组 powers ,它包含 最少 数目的 2 的幂,且它们的和为 n 。powers 数组是 非递减 顺序的。根据前面描述,构造 powers 数组的方法是唯一的。 同时给你一个下标从 0 开始的二维整数数组 queries ,其中 queries[i] = [lefti, righti] ,其中 queries[i] 表示请你求出满足 lefti <= j <= righti 的所有 powers[j] 的乘积。 请你返回一个数组 answers…
leetcode.com 2025-08-11
🟡2438.range-product-queries-of-powers
🏷️ Tags
#bit_manipulation #array #prefix_sum
🟡2438.range-product-queries-of-powers
🏷️ Tags
#bit_manipulation #array #prefix_sum
Telegraph
range-product-queries-of-powers
Given a positive integer n, there exists a 0-indexed array called powers, composed of the minimum number of powers of 2 that sum to n. The array is sorted in non-decreasing order, and there is only one way to form the array. You are also given a 0-indexed…