leetcode.cn 2026-08-19
🟡1386.cinema-seat-allocation
🏷️ Tags
#greedy #bit_manipulation #array #hash_table
🟡1386.cinema-seat-allocation
🏷️ Tags
#greedy #bit_manipulation #array #hash_table
Telegraph
cinema-seat-allocation
如上图所示,电影院的观影厅中有 n 行座位,行编号从 1 到 n ,且每一行内总共有 10 个座位,列编号从 1 到 10 。 给定一个二维数组 reservedSeats ,其中 reservedSeats[i] = [rowi, seati] 表示第 rowi 行的座位 seati 已经被预定。 四人小组必须被安排在同一排的四个座位上。该小组可以坐在以下座位块之一:
leetcode.com 2026-08-19
🟡1386.cinema-seat-allocation
🏷️ Tags
#greedy #bit_manipulation #array #hash_table
🟡1386.cinema-seat-allocation
🏷️ Tags
#greedy #bit_manipulation #array #hash_table
Telegraph
cinema-seat-allocation
A cinema has n rows of seats, numbered from 1 to n. Each row has 10 seats, numbered from 1 to 10. You are given a 2D integer array reservedSeats, where reservedSeats[i] = [rowi, seati] means that seat seati in row rowi is already reserved. A four-person group…
leetcode.cn 2026-08-21
🔴3116.kth-smallest-amount-with-single-denomination-combination
🏷️ Tags
#bit_manipulation #array #math #binary_search #combinatorics #number_theory
🔴3116.kth-smallest-amount-with-single-denomination-combination
🏷️ Tags
#bit_manipulation #array #math #binary_search #combinatorics #number_theory
Telegraph
kth-smallest-amount-with-single-denomination-combination
给你一个整数数组 coins 表示不同面额的硬币,另给你一个整数 k 。 你有无限量的每种面额的硬币。但是,你 不能 组合使用不同面额的硬币。 返回使用这些硬币能制造的 第 kth 小 金额。 示例 1: 输入: coins = [3,6,9], k = 3 输出: 9 解释:给定的硬币可以制造以下金额:3元硬币产生3的倍数:3, 6, 9, 12, 15等。6元硬币产生6的倍数:6, 12, 18, 24等。9元硬币产生9的倍数:9, 18, 27, 36等。所有硬币合起来可以产生:3, 6, 9…
leetcode.com 2026-08-21
🔴3116.kth-smallest-amount-with-single-denomination-combination
🏷️ Tags
#bit_manipulation #array #math #binary_search #combinatorics #number_theory
🔴3116.kth-smallest-amount-with-single-denomination-combination
🏷️ Tags
#bit_manipulation #array #math #binary_search #combinatorics #number_theory
Telegraph
kth-smallest-amount-with-single-denomination-combination
You are given an integer array coins representing coins of different denominations and an integer k. You have an infinite number of coins of each denomination. However, you are not allowed to combine coins of different denominations. Return the kth smallest…
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。