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]…