leetcode.com 2026-07-28
🟡3517.smallest-palindromic-rearrangement-i
🏷️ Tags
#string #counting_sort #sorting
🟡3517.smallest-palindromic-rearrangement-i
🏷️ Tags
#string #counting_sort #sorting
Telegraph
smallest-palindromic-rearrangement-i
You are given a palindromic string s. Return the lexicographically smallest palindromic permutation of s. Example 1: Input: s = "z" Output: "z" Explanation: A string of only one character is already the lexicographically smallest palindrome. Example 2:…
leetcode.cn 2026-07-29
🔴3518.smallest-palindromic-rearrangement-ii
🏷️ Tags
#hash_table #math #string #combinatorics #counting
🔴3518.smallest-palindromic-rearrangement-ii
🏷️ Tags
#hash_table #math #string #combinatorics #counting
Telegraph
smallest-palindromic-rearrangement-ii
给你一个 回文 字符串 s 和一个整数 k。
leetcode.com 2026-07-29
🔴3518.smallest-palindromic-rearrangement-ii
🏷️ Tags
#hash_table #math #string #combinatorics #counting
🔴3518.smallest-palindromic-rearrangement-ii
🏷️ Tags
#hash_table #math #string #combinatorics #counting
Telegraph
smallest-palindromic-rearrangement-ii
You are given a palindromic string s and an integer k. Return the k-th lexicographically smallest palindromic permutation of s. If there are fewer than k distinct palindromic permutations, return an empty string. Note: Different rearrangements that yield…
leetcode.cn 2026-07-31
🟡3016.minimum-number-of-pushes-to-type-word-ii
🏷️ Tags
#greedy #hash_table #string #counting #sorting
🟡3016.minimum-number-of-pushes-to-type-word-ii
🏷️ Tags
#greedy #hash_table #string #counting #sorting
Telegraph
minimum-number-of-pushes-to-type-word-ii
给你一个字符串 word,由小写英文字母组成。 电话键盘上的按键与 不同 小写英文字母集合相映射,可以通过按压按键来组成单词。例如,按键 2 对应 ["a","b","c"],我们需要按一次键来输入 "a",按两次键来输入 "b",按三次键来输入 "c"。 现在允许你将编号为 2 到 9 的按键重新映射到 不同 字母集合。每个按键可以映射到 任意数量 的字母,但每个字母 必须 恰好 映射到 一个 按键上。你需要找到输入字符串 word 所需的 最少 按键次数。 返回重新映射按键后输入 word 所需的 最少…
leetcode.com 2026-07-31
🟡3016.minimum-number-of-pushes-to-type-word-ii
🏷️ Tags
#greedy #hash_table #string #counting #sorting
🟡3016.minimum-number-of-pushes-to-type-word-ii
🏷️ Tags
#greedy #hash_table #string #counting #sorting
Telegraph
minimum-number-of-pushes-to-type-word-ii
You are given a string word containing lowercase English letters. Telephone keypads have keys mapped with distinct collections of lowercase English letters, which can be used to form words by pushing them. For example, the key 2 is mapped with ["a","b","c"]…
leetcode.cn 2026-08-01
🟡486.predict-the-winner
🏷️ Tags
#recursion #array #math #dynamic_programming #game_theory
🟡486.predict-the-winner
🏷️ Tags
#recursion #array #math #dynamic_programming #game_theory
Telegraph
predict-the-winner
给你一个整数数组 nums 。玩家 1 和玩家 2 基于这个数组设计了一个游戏。 玩家 1 和玩家 2 轮流进行自己的回合,玩家 1 先手。开始时,两个玩家的初始分值都是 0 。每一回合,玩家从数组的任意一端取一个数字(即,nums[0] 或 nums[nums.length - 1]),取到的数字将会从数组中移除(数组长度减 1 )。玩家选中的数字将会加到他的得分上。当数组中没有剩余数字可取时,游戏结束。 如果玩家 1 能成为赢家,返回 true 。如果两个玩家得分相等,同样认为玩家 1 是游戏的赢家,也返回…
leetcode.com 2026-08-01
🟡486.predict-the-winner
🏷️ Tags
#recursion #array #math #dynamic_programming #game_theory
🟡486.predict-the-winner
🏷️ Tags
#recursion #array #math #dynamic_programming #game_theory
Telegraph
predict-the-winner
You are given an integer array nums. Two players are playing a game with this array: player 1 and player 2. Player 1 and player 2 take turns, with player 1 starting first. Both players start the game with a score of 0. At each turn, the player takes one of…
leetcode.com 2026-08-03
🔴1406.stone-game-iii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #zero_sum_game
🔴1406.stone-game-iii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #zero_sum_game
Telegraph
stone-game-iii
Alice and Bob continue their games with piles of stones. There are several stones arranged in a row, and each stone has an associated value which is an integer given in the array stoneValue. Alice and Bob take turns, with Alice starting first. On each player's…
leetcode.cn 2026-08-05
🟡3310.remove-methods-from-project
🏷️ Tags
#depth_first_search #breadth_first_search #graph
🟡3310.remove-methods-from-project
🏷️ Tags
#depth_first_search #breadth_first_search #graph
Telegraph
remove-methods-from-project
你正在维护一个项目,该项目有 n 个方法,编号从 0 到 n - 1。 给你两个整数 n 和 k,以及一个二维整数数组 invocations,其中 invocations[i] = [ai, bi] 表示方法 ai 调用了方法 bi。 已知如果方法 k 存在一个已知的 bug。那么方法 k 以及它直接或间接调用的任何方法都被视为 可疑方法 ,我们需要从项目中移除这些方法。 只有当一组方法没有被这组之外的任何方法调用时,这组方法才能被移除。 返回一个数组,包含移除所有 可疑方法 后剩下的所有方法。你可以…
leetcode.com 2026-08-05
🟡3310.remove-methods-from-project
🏷️ Tags
#depth_first_search #breadth_first_search #graph
🟡3310.remove-methods-from-project
🏷️ Tags
#depth_first_search #breadth_first_search #graph
Telegraph
remove-methods-from-project
You are maintaining a project that has n methods numbered from 0 to n - 1. You are given two integers n and k, and a 2D integer array invocations, where invocations[i] = [ai, bi] indicates that method ai invokes method bi. There is a known bug in method k.…
leetcode.cn 2026-08-07
🔴3348.smallest-divisible-digit-product-ii
🏷️ Tags
#greedy #math #string #backtracking #number_theory
🔴3348.smallest-divisible-digit-product-ii
🏷️ Tags
#greedy #math #string #backtracking #number_theory
Telegraph
smallest-divisible-digit-product-ii
给你一个字符串 num ,表示一个 正 整数,同时给你一个整数 t 。 如果一个整数 没有 任何数位是 0 ,那么我们称这个整数是 无零 数字。