leetcode.cn 2026-08-27
🟡3720.lexicographically-smallest-permutation-greater-than-target
🏷️ Tags
#greedy #hash_table #string #counting #enumeration
🟡3720.lexicographically-smallest-permutation-greater-than-target
🏷️ Tags
#greedy #hash_table #string #counting #enumeration
Telegraph
lexicographically-smallest-permutation-greater-than-target
给你两个长度均为 n 且仅由小写英文字母组成的字符串 s 和 target。
leetcode.com 2026-08-27
🟡3720.lexicographically-smallest-permutation-greater-than-target
🏷️ Tags
#greedy #hash_table #string #counting #enumeration
🟡3720.lexicographically-smallest-permutation-greater-than-target
🏷️ Tags
#greedy #hash_table #string #counting #enumeration
Telegraph
lexicographically-smallest-permutation-greater-than-target
You are given two strings s and target, both having length n, consisting of lowercase English letters. Return the lexicographically smallest permutation of s that is strictly greater than target. If no permutation of s is lexicographically strictly greater…
leetcode.cn 2026-08-28
🔴3734.lexicographically-smallest-palindromic-permutation-greater-than-target
🏷️ Tags
#two_pointers #string #enumeration
🔴3734.lexicographically-smallest-palindromic-permutation-greater-than-target
🏷️ Tags
#two_pointers #string #enumeration
Telegraph
lexicographically-smallest-palindromic-permutation-greater-than-target
给你两个长度均为 n 的字符串 s 和目标字符串 target,它们都由小写英文字母组成。
leetcode.com 2026-08-28
🔴3734.lexicographically-smallest-palindromic-permutation-greater-than-target
🏷️ Tags
#two_pointers #string #enumeration
🔴3734.lexicographically-smallest-palindromic-permutation-greater-than-target
🏷️ Tags
#two_pointers #string #enumeration
Telegraph
lexicographically-smallest-palindromic-permutation-greater-than-target
You are given two strings s and target, each of length n, consisting of lowercase English letters. Return the lexicographically smallest string that is both a palindromic permutation of s and strictly greater than target. If no such permutation exists, return…
leetcode.cn 2026-08-29
🟡2948.make-lexicographically-smallest-array-by-swapping-elements
🏷️ Tags
#union_find #array #sorting
🟡2948.make-lexicographically-smallest-array-by-swapping-elements
🏷️ Tags
#union_find #array #sorting
Telegraph
make-lexicographically-smallest-array-by-swapping-elements
给你一个下标从 0 开始的 正整数 数组 nums 和一个 正整数 limit 。 在一次操作中,你可以选择任意两个下标 i 和 j,如果 满足 |nums[i] - nums[j]| <= limit ,则交换 nums[i] 和 nums[j] 。 返回执行任意次操作后能得到的 字典序最小的数组 。 如果在数组 a 和数组 b 第一个不同的位置上,数组 a 中的对应元素比数组 b 中的对应元素的字典序更小,则认为数组 a 就比数组 b 字典序更小。例如,数组 [2,10,3] 比数组 [10,2,3]…
leetcode.com 2026-08-29
🟡2948.make-lexicographically-smallest-array-by-swapping-elements
🏷️ Tags
#union_find #array #sorting
🟡2948.make-lexicographically-smallest-array-by-swapping-elements
🏷️ Tags
#union_find #array #sorting
Telegraph
make-lexicographically-smallest-array-by-swapping-elements
You are given a 0-indexed array of positive integers nums and a positive integer limit. In one operation, you can choose any two indices i and j and swap nums[i] and nums[j] if |nums[i] - nums[j]| <= limit. Return the lexicographically smallest array that…
leetcode.cn 2026-08-31
🟡2058.find-the-minimum-and-maximum-number-of-nodes-between-critical-points
🏷️ Tags
#linked_list
🟡2058.find-the-minimum-and-maximum-number-of-nodes-between-critical-points
🏷️ Tags
#linked_list
Telegraph
find-the-minimum-and-maximum-number-of-nodes-between-critical-points
链表中的 临界点 定义为一个 局部极大值点 或 局部极小值点 。 如果当前节点的值 严格大于 前一个节点和后一个节点,那么这个节点就是一个 局部极大值点 。 如果当前节点的值 严格小于 前一个节点和后一个节点,那么这个节点就是一个 局部极小值点 。 注意:节点只有在同时存在前一个节点和后一个节点的情况下,才能成为一个 局部极大值点 / 极小值点 。 给你一个链表 head ,返回一个长度为 2 的数组 [minDistance, maxDistance] ,其中 minDistance 是任意两个不…
leetcode.com 2026-08-31
🟡2058.find-the-minimum-and-maximum-number-of-nodes-between-critical-points
🏷️ Tags
#linked_list
🟡2058.find-the-minimum-and-maximum-number-of-nodes-between-critical-points
🏷️ Tags
#linked_list
Telegraph
find-the-minimum-and-maximum-number-of-nodes-between-critical-points
A critical point in a linked list is defined as either a local maxima or a local minima. A node is a local maxima if the current node has a value strictly greater than the previous node and the next node. A node is a local minima if the current node has a…
leetcode.cn 2026-09-01
🟡3568.minimum-moves-to-clean-the-classroom
🏷️ Tags
#bit_manipulation #breadth_first_search #array #hash_table #matrix
🟡3568.minimum-moves-to-clean-the-classroom
🏷️ Tags
#bit_manipulation #breadth_first_search #array #hash_table #matrix
Telegraph
minimum-moves-to-clean-the-classroom
给你一个 m x n 的网格图 classroom,其中一个学生志愿者负责清理散布在教室里的垃圾。网格图中的每个单元格是以下字符之一: