leetcode.com 2023-12-17
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #hash_table #ordered_set #heap_priority_queue
Telegraph
design-a-food-rating-system
Design a food rating system that can do the following:
leetcode.cn 2025-02-28
🟡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
设计一个支持下述操作的食物评分系统:
leetcode.cn 2025-03-20
🔴2612.minimum-reverse-operations
🏷️ Tags
#breadth_first_search #array #ordered_set
🔴2612.minimum-reverse-operations
🏷️ Tags
#breadth_first_search #array #ordered_set
Telegraph
minimum-reverse-operations
给你一个整数 n 和一个在范围 [0, n - 1] 以内的整数 p ,它们表示一个长度为 n 且下标从 0 开始的数组 arr ,数组中除了下标为 p 处是 1 以外,其他所有数都是 0 。 同时给你一个整数数组 banned ,它包含数组中的一些位置。banned 中第 i 个位置表示 arr[banned[i]] = 0 ,题目保证 banned[i] != p 。 你可以对 arr 进行 若干次 操作。一次操作中,你选择大小为 k 的一个 子数组 ,并将它 翻转 。在任何一次翻转操作后,你都需要确保…
leetcode.cn 2025-04-15
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
Telegraph
count-good-triplets-in-an-array
给你两个下标从 0 开始且长度为 n 的整数数组 nums1 和 nums2 ,两者都是 [0, 1, ..., n - 1] 的 排列 。 好三元组 指的是 3 个 互不相同 的值,且它们在数组 nums1 和 nums2 中出现顺序保持一致。换句话说,如果我们将 pos1v 记为值 v 在 nums1 中出现的位置,pos2v 为值 v 在 nums2 中的位置,那么一个好三元组定义为 0 <= x, y, z <= n - 1 ,且 pos1x < pos1y < pos1z 和 pos2x < pos2y…
leetcode.com 2025-04-15
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
Telegraph
count-good-triplets-in-an-array
You are given two 0-indexed arrays nums1 and nums2 of length n, both of which are permutations of [0, 1, ..., n - 1]. A good triplet is a set of 3 distinct values which are present in increasing order by position both in nums1 and nums2. In other words, if…
👍1
leetcode.com 2025-08-05
🟢3477.fruits-into-baskets-ii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set #simulation
🟢3477.fruits-into-baskets-ii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set #simulation
Telegraph
fruits-into-baskets-ii
You are given two arrays of integers, fruits and baskets, each of length n, where fruits[i] represents the quantity of the ith type of fruit, and baskets[j] represents the capacity of the jth basket. From left to right, place the fruits according to these…
leetcode.cn 2025-08-06
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
Telegraph
fruits-into-baskets-iii
给你两个长度为 n 的整数数组,fruits 和 baskets,其中 fruits[i] 表示第 i 种水果的 数量,baskets[j] 表示第 j 个篮子的 容量。
leetcode.com 2025-08-06
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
🟡3479.fruits-into-baskets-iii
🏷️ Tags
#segment_tree #array #binary_search #ordered_set
Telegraph
fruits-into-baskets-iii
You are given two arrays of integers, fruits and baskets, each of length n, where fruits[i] represents the quantity of the ith type of fruit, and baskets[j] represents the capacity of the jth basket. From left to right, place the fruits according to these…
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 类:
leetcode.com 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
There is a task management system that allows users to manage their tasks, each associated with a priority. The system should efficiently handle adding, modifying, executing, and removing tasks. Implement the TaskManager class:
leetcode.cn 2025-09-20
🟡3508.implement-router
🏷️ Tags
#design #queue #array #hash_table #binary_search #ordered_set
🟡3508.implement-router
🏷️ Tags
#design #queue #array #hash_table #binary_search #ordered_set
Telegraph
implement-router
请你设计一个数据结构来高效管理网络路由器中的数据包。每个数据包包含以下属性:
leetcode.cn 2025-09-21
🔴1912.design-movie-rental-system
🏷️ Tags
#design #array #hash_table #ordered_set #heap_priority_queue
🔴1912.design-movie-rental-system
🏷️ Tags
#design #array #hash_table #ordered_set #heap_priority_queue
Telegraph
design-movie-rental-system
你有一个电影租借公司和 n 个电影商店。你想要实现一个电影租借系统,它支持查询、预订和返还电影的操作。同时系统还能生成一份当前被借出电影的报告。 所有电影用二维整数数组 entries 表示,其中 entries[i] = [shopi, moviei, pricei] 表示商店 shopi 有一份电影 moviei 的拷贝,租借价格为 pricei 。每个商店有 至多一份 编号为 moviei 的电影拷贝。 系统需要支持以下操作:
leetcode.com 2025-09-21
🔴1912.design-movie-rental-system
🏷️ Tags
#design #array #hash_table #ordered_set #heap_priority_queue
🔴1912.design-movie-rental-system
🏷️ Tags
#design #array #hash_table #ordered_set #heap_priority_queue
Telegraph
design-movie-rental-system
You have a movie renting company consisting of n shops. You want to implement a renting system that supports searching for, booking, and returning movies. The system should also support generating a report of the currently rented movies. Each movie is given…
leetcode.cn 2025-11-06
🟡3607.power-grid-maintenance
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #hash_table #ordered_set #heap_priority_queue
🟡3607.power-grid-maintenance
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #hash_table #ordered_set #heap_priority_queue
Telegraph
power-grid-maintenance
给你一个整数 c,表示 c 个电站,每个电站有一个唯一标识符 id,从 1 到 c 编号。 这些电站通过 n 条 双向 电缆互相连接,表示为一个二维数组 connections,其中每个元素 connections[i] = [ui, vi] 表示电站 ui 和电站 vi 之间的连接。直接或间接连接的电站组成了一个 电网 。 最初,所有 电站均处于在线(正常运行)状态。 另给你一个二维数组 queries,其中每个查询属于以下 两种类型之一 :
leetcode.com 2025-11-06
🟡3607.power-grid-maintenance
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #hash_table #ordered_set #heap_priority_queue
🟡3607.power-grid-maintenance
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #hash_table #ordered_set #heap_priority_queue
Telegraph
power-grid-maintenance
You are given an integer c representing c power stations, each with a unique identifier id from 1 to c (1‑based indexing). These stations are interconnected via n bidirectional cables, represented by a 2D array connections, where each element connections[i]…