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-26
🟡2904.shortest-and-lexicographically-smallest-beautiful-string
🏷️ Tags
#string #sliding_window
🟡2904.shortest-and-lexicographically-smallest-beautiful-string
🏷️ Tags
#string #sliding_window
Telegraph
shortest-and-lexicographically-smallest-beautiful-string
给你一个二进制字符串 s 和一个正整数 k 。 如果 s 的某个子字符串中 1 的个数恰好等于 k ,则称这个子字符串是一个 美丽子字符串 。 令 len 等于 最短 美丽子字符串的长度。 返回长度等于 len 且字典序 最小 的美丽子字符串。如果 s 中不含美丽子字符串,则返回一个 空 字符串。 对于相同长度的两个字符串 a 和 b ,如果在 a 和 b 出现不同的第一个位置上,a 中该位置上的字符严格大于 b 中的对应字符,则认为字符串 a 字典序 大于 字符串 b 。
leetcode.com 2026-08-26
🟡2904.shortest-and-lexicographically-smallest-beautiful-string
🏷️ Tags
#string #sliding_window
🟡2904.shortest-and-lexicographically-smallest-beautiful-string
🏷️ Tags
#string #sliding_window
Telegraph
shortest-and-lexicographically-smallest-beautiful-string
You are given a binary string s and a positive integer k. A substring of s is beautiful if the number of 1's in it is exactly k. Let len be the length of the shortest beautiful substring. Return the lexicographically smallest beautiful substring of string…
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…