Leetcode Daily Question
@leetcodeDailyQuestionChannel
2.46K
subscribers
517
files
2.16K
links
Why are you asking me to do Leetcode for this CSS job?
Download Telegram
Join
Leetcode Daily Question
2.46K subscribers
Leetcode Daily Question
leetcode.cn
2025-11-30
🟡
1590.make-sum-divisible-by-p
🏷️
Tags
#array
#hash_table
#prefix_sum
Telegraph
make-sum-divisible-by-p
给你一个正整数数组 nums,请你移除 最短 子数组(可以为 空),使得剩余元素的 和 能被 p 整除。 不允许 将整个数组都移除。 请你返回你需要移除的最短子数组的长度,如果无法满足题目要求,返回 -1 。 子数组 定义为原数组中连续的一组元素。 示例 1: 输入:nums = [3,1,4,2], p = 6 输出:1 解释:nums 中元素和为 10,不能被 p 整除。我们可以移除子数组 [4] ,剩余元素的和为 6 。 示例 2: 输入:nums = [6,3,5,2], p = 9 输出:2…
来源
答案
Leetcode Daily Question
leetcode.com
2025-11-30
🟡
1590.make-sum-divisible-by-p
🏷️
Tags
#array
#hash_table
#prefix_sum
Telegraph
make-sum-divisible-by-p
Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed to remove the whole array. Return the length of the smallest subarray that you need to…
Source
Solution
Leetcode Daily Question
leetcode.cn
2025-12-02
🟡
3623.count-number-of-trapezoids-i
🏷️
Tags
#geometry
#array
#hash_table
#math
Telegraph
count-number-of-trapezoids-i
给你一个二维整数数组 points,其中 points[i] = [xi, yi] 表示第 i 个点在笛卡尔平面上的坐标。 水平梯形 是一种凸四边形,具有 至少一对 水平边(即平行于 x 轴的边)。两条直线平行当且仅当它们的斜率相同。 返回可以从 points 中任意选择四个不同点组成的 水平梯形 数量。 由于答案可能非常大,请返回结果对 109 + 7 取余数后的值。 示例 1: 输入: points = [[1,0],[2,0],[3,0],[2,2],[3,2]] 输出: 3 解释: 有三种不…
来源
答案
Leetcode Daily Question
leetcode.com
2025-12-02
🟡
3623.count-number-of-trapezoids-i
🏷️
Tags
#geometry
#array
#hash_table
#math
Telegraph
count-number-of-trapezoids-i
You are given a 2D integer array points, where points[i] = [xi, yi] represents the coordinates of the ith point on the Cartesian plane. A horizontal trapezoid is a convex quadrilateral with at least one pair of horizontal sides (i.e. parallel to the x-axis).…
Source
Solution
Leetcode Daily Question
leetcode.cn
2025-12-03
🔴
3625.count-number-of-trapezoids-ii
🏷️
Tags
#geometry
#array
#hash_table
#math
Telegraph
count-number-of-trapezoids-ii
给你一个二维整数数组 points,其中 points[i] = [xi, yi] 表示第 i 个点在笛卡尔平面上的坐标。
来源
答案
Leetcode Daily Question
leetcode.com
2025-12-03
🔴
3625.count-number-of-trapezoids-ii
🏷️
Tags
#geometry
#array
#hash_table
#math
Telegraph
count-number-of-trapezoids-ii
You are given a 2D integer array points where points[i] = [xi, yi] represents the coordinates of the ith point on the Cartesian plane. Return the number of unique trapezoids that can be formed by choosing any four distinct points from points. A trapezoid…
Source
Solution
Leetcode Daily Question
leetcode.cn
2025-12-09
🟡
3583.count-special-triplets
🏷️
Tags
#array
#hash_table
#counting
Telegraph
count-special-triplets
给你一个整数数组 nums。 特殊三元组 定义为满足以下条件的下标三元组 (i, j, k):
来源
答案
Leetcode Daily Question
leetcode.com
2025-12-09
🟡
3583.count-special-triplets
🏷️
Tags
#array
#hash_table
#counting
Telegraph
count-special-triplets
You are given an integer array nums. A special triplet is defined as a triplet of indices (i, j, k) such that:
Source
Solution
Leetcode Daily Question
leetcode.cn
2025-12-11
🟡
3531.count-covered-buildings
🏷️
Tags
#array
#hash_table
#sorting
Telegraph
count-covered-buildings
给你一个正整数 n,表示一个 n x n 的城市,同时给定一个二维数组 buildings,其中 buildings[i] = [x, y] 表示位于坐标 [x, y] 的一个 唯一 建筑。 如果一个建筑在四个方向(左、右、上、下)中每个方向上都至少存在一个建筑,则称该建筑 被覆盖 。 返回 被覆盖 的建筑数量。 示例 1: 输入: n = 3, buildings = [[1,2],[2,2],[3,2],[2,1],[2,3]] 输出: 1 解释:
来源
答案
Leetcode Daily Question
leetcode.com
2025-12-11
🟡
3531.count-covered-buildings
🏷️
Tags
#array
#hash_table
#sorting
Telegraph
count-covered-buildings
You are given a positive integer n, representing an n x n city. You are also given a 2D grid buildings, where buildings[i] = [x, y] denotes a unique building located at coordinates [x, y]. A building is covered if there is at least one building in all four…
Source
Solution
Leetcode Daily Question
leetcode.cn
2025-12-13
🟢
3606.coupon-code-validator
🏷️
Tags
#array
#hash_table
#string
#sorting
Telegraph
coupon-code-validator
给你三个长度为 n 的数组,分别描述 n 个优惠券的属性:code、businessLine 和 isActive。其中,第 i 个优惠券具有以下属性:
来源
答案
Leetcode Daily Question
leetcode.com
2025-12-13
🟢
3606.coupon-code-validator
🏷️
Tags
#array
#hash_table
#string
#sorting
Telegraph
coupon-code-validator
You are given three arrays of length n that describe the properties of n coupons: code, businessLine, and isActive. The ith coupon has:
Source
Solution