leetcode.com 2026-08-24
🔴1872.stone-game-viii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
🔴1872.stone-game-viii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
Telegraph
stone-game-viii
Alice and Bob take turns playing a game, with Alice starting first. There are n stones arranged in a row. On each player's turn, while the number of stones is more than one, they will do the following:
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-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,其中一个学生志愿者负责清理散布在教室里的垃圾。网格图中的每个单元格是以下字符之一:
leetcode.com 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
You are given an m x n grid classroom where a student volunteer is tasked with cleaning up litter scattered around the room. Each cell in the grid is one of the following: