leetcode.cn 2025-06-03
🔴1298.maximum-candies-you-can-get-from-boxes
🏷️ Tags
#breadth_first_search #graph #array
🔴1298.maximum-candies-you-can-get-from-boxes
🏷️ Tags
#breadth_first_search #graph #array
Telegraph
maximum-candies-you-can-get-from-boxes
给你 n 个盒子,每个盒子的格式为 [status, candies, keys, containedBoxes] ,其中:
leetcode.com 2025-06-03
🔴1298.maximum-candies-you-can-get-from-boxes
🏷️ Tags
#breadth_first_search #graph #array
🔴1298.maximum-candies-you-can-get-from-boxes
🏷️ Tags
#breadth_first_search #graph #array
Telegraph
maximum-candies-you-can-get-from-boxes
You have n boxes labeled from 0 to n - 1. You are given four arrays: status, candies, keys, and containedBoxes where:
leetcode.cn 2025-06-04
🟡3403.find-the-lexicographically-largest-string-from-the-box-i
🏷️ Tags
#two_pointers #string #enumeration
🟡3403.find-the-lexicographically-largest-string-from-the-box-i
🏷️ Tags
#two_pointers #string #enumeration
Telegraph
find-the-lexicographically-largest-string-from-the-box-i
给你一个字符串 word 和一个整数 numFriends。 Alice 正在为她的 numFriends 位朋友组织一个游戏。游戏分为多个回合,在每一回合中:
leetcode.com 2025-06-04
🟡3403.find-the-lexicographically-largest-string-from-the-box-i
🏷️ Tags
#two_pointers #string #enumeration
🟡3403.find-the-lexicographically-largest-string-from-the-box-i
🏷️ Tags
#two_pointers #string #enumeration
Telegraph
find-the-lexicographically-largest-string-from-the-box-i
You are given a string word, and an integer numFriends. Alice is organizing a game for her numFriends friends. There are multiple rounds in the game, where in each round:
leetcode.cn 2025-06-06
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
Telegraph
using-a-robot-to-print-the-lexicographically-smallest-string
给你一个字符串 s 和一个机器人,机器人当前有一个空字符串 t 。执行以下操作之一,直到 s 和 t 都变成空字符串:
leetcode.com 2025-06-06
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
Telegraph
using-a-robot-to-print-the-lexicographically-smallest-string
You are given a string s and a robot that currently holds an empty string t. Apply one of the following operations until s and t are both empty:
leetcode.cn 2025-06-07
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
Telegraph
lexicographically-minimum-string-after-removing-stars
给你一个字符串 s 。它可能包含任意数量的 '*' 字符。你的任务是删除所有的 '*' 字符。 当字符串还存在至少一个 '*' 字符时,你可以执行以下操作:
leetcode.com 2025-06-07
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
Telegraph
lexicographically-minimum-string-after-removing-stars
You are given a string s. It may contain any number of '*' characters. Your task is to remove all '*' characters. While there is a '*', do the following operation:
leetcode.cn 2025-06-10
🟢3442.maximum-difference-between-even-and-odd-frequency-i
🏷️ Tags
#hash_table #string #counting
🟢3442.maximum-difference-between-even-and-odd-frequency-i
🏷️ Tags
#hash_table #string #counting
Telegraph
maximum-difference-between-even-and-odd-frequency-i
给你一个由小写英文字母组成的字符串 s 。 请你找出字符串中两个字符 a1 和 a2 的出现频次之间的 最大 差值 diff = a1 - a2,这两个字符需要满足:
leetcode.com 2025-06-10
🟢3442.maximum-difference-between-even-and-odd-frequency-i
🏷️ Tags
#hash_table #string #counting
🟢3442.maximum-difference-between-even-and-odd-frequency-i
🏷️ Tags
#hash_table #string #counting
Telegraph
maximum-difference-between-even-and-odd-frequency-i
You are given a string s consisting of lowercase English letters. Your task is to find the maximum difference diff = freq(a1) - freq(a2) between the frequency of characters a1 and a2 in the string such that:
leetcode.cn 2025-06-11
🔴3445.maximum-difference-between-even-and-odd-frequency-ii
🏷️ Tags
#string #enumeration #prefix_sum #sliding_window
🔴3445.maximum-difference-between-even-and-odd-frequency-ii
🏷️ Tags
#string #enumeration #prefix_sum #sliding_window
Telegraph
maximum-difference-between-even-and-odd-frequency-ii
给你一个字符串 s 和一个整数 k 。请你找出 s 的子字符串 subs 中两个字符的出现频次之间的 最大 差值,freq[a] - freq[b] ,其中:
leetcode.com 2025-06-11
🔴3445.maximum-difference-between-even-and-odd-frequency-ii
🏷️ Tags
#string #enumeration #prefix_sum #sliding_window
🔴3445.maximum-difference-between-even-and-odd-frequency-ii
🏷️ Tags
#string #enumeration #prefix_sum #sliding_window
Telegraph
maximum-difference-between-even-and-odd-frequency-ii
You are given a string s and an integer k. Your task is to find the maximum difference between the frequency of two characters, freq[a] - freq[b], in a substring subs of s, such that:
leetcode.cn 2025-06-12
🟢3423.maximum-difference-between-adjacent-elements-in-a-circular-array
🏷️ Tags
#array
🟢3423.maximum-difference-between-adjacent-elements-in-a-circular-array
🏷️ Tags
#array
Telegraph
maximum-difference-between-adjacent-elements-in-a-circular-array
给你一个 循环 数组 nums ,请你找出相邻元素之间的 最大 绝对差值。 注意:一个循环数组中,第一个元素和最后一个元素是相邻的。 示例 1: 输入:nums = [1,2,4] 输出:3 解释: 由于 nums 是循环的,nums[0] 和 nums[2] 是相邻的,它们之间的绝对差值是最大值 |4 - 1| = 3 。 示例 2: 输入:nums = [-5,-10,-5] 输出:5 解释: 相邻元素 nums[0] 和 nums[1] 之间的绝对差值为最大值 |-5 - (-10)| = 5 。…
leetcode.com 2025-06-12
🟢3423.maximum-difference-between-adjacent-elements-in-a-circular-array
🏷️ Tags
#array
🟢3423.maximum-difference-between-adjacent-elements-in-a-circular-array
🏷️ Tags
#array
Telegraph
maximum-difference-between-adjacent-elements-in-a-circular-array
Given a circular array nums, find the maximum absolute difference between adjacent elements. Note: In a circular array, the first and last elements are adjacent. Example 1: Input: nums = [1,2,4] Output: 3 Explanation: Because nums is circular, nums[0] and…
leetcode.cn 2025-06-13
🟡2616.minimize-the-maximum-difference-of-pairs
🏷️ Tags
#greedy #array #binary_search
🟡2616.minimize-the-maximum-difference-of-pairs
🏷️ Tags
#greedy #array #binary_search
Telegraph
minimize-the-maximum-difference-of-pairs
给你一个下标从 0 开始的整数数组 nums 和一个整数 p 。请你从 nums 中找到 p 个下标对,每个下标对对应数值取差值,你需要使得这 p 个差值的 最大值 最小。同时,你需要确保每个下标在这 p 个下标对中最多出现一次。 对于一个下标对 i 和 j ,这一对的差值为 |nums[i] - nums[j]| ,其中 |x| 表示 x 的 绝对值 。 请你返回 p 个下标对对应数值 最大差值 的 最小值 。 示例 1: 输入:nums = [10,1,2,7,1,3], p = 2 输出:1 解释:第一个下标对选择…