leetcode.cn 2026-06-01
🟢2144.minimum-cost-of-buying-candies-with-discount
🏷️ Tags
#greedy #array #sorting
🟢2144.minimum-cost-of-buying-candies-with-discount
🏷️ Tags
#greedy #array #sorting
Telegraph
minimum-cost-of-buying-candies-with-discount
一家商店正在打折销售糖果。每购买 两个 糖果,商店会 免费 送一个糖果。 免费送的糖果唯一的限制是:它的价格需要小于等于购买的两个糖果价格的 较小值 。
leetcode.com 2026-06-01
🟢2144.minimum-cost-of-buying-candies-with-discount
🏷️ Tags
#greedy #array #sorting
🟢2144.minimum-cost-of-buying-candies-with-discount
🏷️ Tags
#greedy #array #sorting
Telegraph
minimum-cost-of-buying-candies-with-discount
A shop is selling candies at a discount. For every two candies sold, the shop gives a third candy for free. The customer can choose any candy to take away for free as long as the cost of the chosen candy is less than or equal to the minimum cost of the two…
leetcode.cn 2026-06-02
🟢3633.earliest-finish-time-for-land-and-water-rides-i
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
🟢3633.earliest-finish-time-for-land-and-water-rides-i
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
Telegraph
earliest-finish-time-for-land-and-water-rides-i
给你两种类别的游乐园项目:陆地游乐设施 和 水上游乐设施。
leetcode.com 2026-06-02
🟢3633.earliest-finish-time-for-land-and-water-rides-i
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
🟢3633.earliest-finish-time-for-land-and-water-rides-i
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
Telegraph
earliest-finish-time-for-land-and-water-rides-i
You are given two categories of theme park attractions: land rides and water rides.
leetcode.cn 2026-06-03
🟡3635.earliest-finish-time-for-land-and-water-rides-ii
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
🟡3635.earliest-finish-time-for-land-and-water-rides-ii
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
Telegraph
earliest-finish-time-for-land-and-water-rides-ii
给你两种类别的游乐园项目:陆地游乐设施 和 水上游乐设施。
leetcode.com 2026-06-03
🟡3635.earliest-finish-time-for-land-and-water-rides-ii
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
🟡3635.earliest-finish-time-for-land-and-water-rides-ii
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
Telegraph
earliest-finish-time-for-land-and-water-rides-ii
You are given two categories of theme park attractions: land rides and water rides.
leetcode.cn 2026-06-28
🟡1846.maximum-element-after-decreasing-and-rearranging
🏷️ Tags
#greedy #array #sorting
🟡1846.maximum-element-after-decreasing-and-rearranging
🏷️ Tags
#greedy #array #sorting
Telegraph
maximum-element-after-decreasing-and-rearranging
给你一个正整数数组 arr 。请你对 arr 执行一些操作(也可以不进行任何操作),使得数组满足以下条件:
leetcode.com 2026-06-28
🟡1846.maximum-element-after-decreasing-and-rearranging
🏷️ Tags
#greedy #array #sorting
🟡1846.maximum-element-after-decreasing-and-rearranging
🏷️ Tags
#greedy #array #sorting
Telegraph
maximum-element-after-decreasing-and-rearranging
You are given an array of positive integers arr. Perform some operations (possibly none) on arr so that it satisfies these conditions:
leetcode.cn 2026-07-10
🔴3534.path-existence-queries-in-a-graph-ii
🏷️ Tags
#greedy #bit_manipulation #graph #array #two_pointers #binary_search #dynamic_programming #sorting
🔴3534.path-existence-queries-in-a-graph-ii
🏷️ Tags
#greedy #bit_manipulation #graph #array #two_pointers #binary_search #dynamic_programming #sorting
Telegraph
path-existence-queries-in-a-graph-ii
给你一个整数 n,表示图中的节点数量,这些节点按从 0 到 n - 1 编号。 同时给你一个长度为 n 的整数数组 nums,以及一个整数 maxDiff。 如果满足 |nums[i] - nums[j]| <= maxDiff(即 nums[i] 和 nums[j] 的 绝对差 至多为 maxDiff),则节点 i 和节点 j 之间存在一条 无向边 。 此外,给你一个二维整数数组 queries。对于每个 queries[i] = [ui, vi],找到节点 ui 和节点 vi 之间的 最短距离 。如果两节点之间不存在路径,则返回…
leetcode.com 2026-07-10
🔴3534.path-existence-queries-in-a-graph-ii
🏷️ Tags
#greedy #bit_manipulation #graph #array #two_pointers #binary_search #dynamic_programming #sorting
🔴3534.path-existence-queries-in-a-graph-ii
🏷️ Tags
#greedy #bit_manipulation #graph #array #two_pointers #binary_search #dynamic_programming #sorting
Telegraph
path-existence-queries-in-a-graph-ii
You are given an integer n representing the number of nodes in a graph, labeled from 0 to n - 1. You are also given an integer array nums of length n and an integer maxDiff. An undirected edge exists between nodes i and j if the absolute difference between…
leetcode.cn 2026-07-16
🟡3867.sum-of-gcd-of-formed-pairs
🏷️ Tags
#array #math #two_pointers #number_theory #sorting #simulation
🟡3867.sum-of-gcd-of-formed-pairs
🏷️ Tags
#array #math #two_pointers #number_theory #sorting #simulation
Telegraph
sum-of-gcd-of-formed-pairs
给你一个长度为 n 的整数数组 nums。
leetcode.com 2026-07-16
🟡3867.sum-of-gcd-of-formed-pairs
🏷️ Tags
#array #math #two_pointers #number_theory #sorting #simulation
🟡3867.sum-of-gcd-of-formed-pairs
🏷️ Tags
#array #math #two_pointers #number_theory #sorting #simulation
Telegraph
sum-of-gcd-of-formed-pairs
You are given an integer array nums of length n. Construct an array prefixGcd where for each index i: