WELCOME

Ashley's blog

A stream of thoughts

Day: 1 9 月, 2026

LeetCode刷题记录第四周

2948 交换得到字典序最小的数组 给你一个下标从 0 开始的 正整数 数组 nums 和一个 正整数 limit 。 在一次操作中,你可以选择任意两个下标 i 和 j,如果 满足 |nums[i] – nums[j]| <= limit ,则交换 nums[i] 和 nums[j] 。 返回执行任意次

Read More »