leetcode.cn 2025-09-09
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
Telegraph
number-of-people-aware-of-a-secret
在第 1 天,有一个人发现了一个秘密。 给你一个整数 delay ,表示每个人会在发现秘密后的 delay 天之后,每天 给一个新的人 分享 秘密。同时给你一个整数 forget ,表示每个人在发现秘密 forget 天之后会 忘记 这个秘密。一个人 不能 在忘记秘密那一天及之后的日子里分享秘密。 给你一个整数 n ,请你返回在第 n 天结束时,知道秘密的人数。由于答案可能会很大,请你将结果对 109 + 7 取余 后返回。 示例 1: 输入:n = 6, delay = 2, forget = 4…
leetcode.com 2025-09-09
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
Telegraph
number-of-people-aware-of-a-secret
On day 1, one person discovers a secret. You are given an integer delay, which means that each person will share the secret with a new person every day, starting from delay days after discovering the secret. You are also given an integer forget, which means…
leetcode.cn 2025-09-13
🟢3541.find-most-frequent-vowel-and-consonant
🏷️ Tags
#hash_table #string #counting
🟢3541.find-most-frequent-vowel-and-consonant
🏷️ Tags
#hash_table #string #counting
Telegraph
find-most-frequent-vowel-and-consonant
给你一个由小写英文字母('a' 到 'z')组成的字符串 s。你的任务是找出出现频率 最高 的元音('a'、'e'、'i'、'o'、'u' 中的一个)和出现频率最高的辅音(除元音以外的所有字母),并返回这两个频率之和。 注意:如果有多个元音或辅音具有相同的最高频率,可以任选其中一个。如果字符串中没有元音或没有辅音,则其频率视为 0。
leetcode.com 2025-09-13
🟢3541.find-most-frequent-vowel-and-consonant
🏷️ Tags
#hash_table #string #counting
🟢3541.find-most-frequent-vowel-and-consonant
🏷️ Tags
#hash_table #string #counting
Telegraph
find-most-frequent-vowel-and-consonant
You are given a string s consisting of lowercase English letters ('a' to 'z'). Your task is to:
leetcode.cn 2025-09-16
🔴2197.replace-non-coprime-numbers-in-array
🏷️ Tags
#stack #array #math #number_theory
🔴2197.replace-non-coprime-numbers-in-array
🏷️ Tags
#stack #array #math #number_theory
Telegraph
replace-non-coprime-numbers-in-array
给你一个整数数组 nums 。请你对数组执行下述操作:
leetcode.com 2025-09-16
🔴2197.replace-non-coprime-numbers-in-array
🏷️ Tags
#stack #array #math #number_theory
🔴2197.replace-non-coprime-numbers-in-array
🏷️ Tags
#stack #array #math #number_theory
Telegraph
replace-non-coprime-numbers-in-array
You are given an array of integers nums. Perform the following steps:
leetcode.cn 2025-09-17
🟡2349.design-a-number-container-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
🟡2349.design-a-number-container-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
Telegraph
design-a-number-container-system
设计一个数字容器系统,可以实现以下功能:
leetcode.com 2025-09-17
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #array #hash_table #string #ordered_set #heap_priority_queue
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #array #hash_table #string #ordered_set #heap_priority_queue
Telegraph
design-a-food-rating-system
Design a food rating system that can do the following:
leetcode.cn 2025-09-18
🟡3408.design-task-manager
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
🟡3408.design-task-manager
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
Telegraph
design-task-manager
一个任务管理器系统可以让用户管理他们的任务,每个任务有一个优先级。这个系统需要高效地处理添加、修改、执行和删除任务的操作。 请你设计一个 TaskManager 类: