leetcode.cn 2026-11-04
🔴3505.minimum-operations-to-make-elements-within-k-subarrays-equal
🏷️ Tags
#array #hash_table #math #dynamic_programming #sliding_window #heap_priority_queue
🔴3505.minimum-operations-to-make-elements-within-k-subarrays-equal
🏷️ Tags
#array #hash_table #math #dynamic_programming #sliding_window #heap_priority_queue
Telegraph
minimum-operations-to-make-elements-within-k-subarrays-equal
给你一个整数数组 nums 和两个整数 x 和 k。你可以执行以下操作任意次(包括零次):
leetcode.com 2026-11-04
🔴3505.minimum-operations-to-make-elements-within-k-subarrays-equal
🏷️ Tags
#array #hash_table #math #dynamic_programming #sliding_window #heap_priority_queue
🔴3505.minimum-operations-to-make-elements-within-k-subarrays-equal
🏷️ Tags
#array #hash_table #math #dynamic_programming #sliding_window #heap_priority_queue
Telegraph
minimum-operations-to-make-elements-within-k-subarrays-equal
You are given an integer array nums and two integers, x and k. You can perform the following operation any number of times (including zero):
leetcode.cn 2026-11-05
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
find-the-distance-value-between-two-arrays
给你两个整数数组 arr1 , arr2 和一个整数 d ,请你返回两个数组之间的 距离值 。 「距离值」 定义为符合此距离要求的元素数目:对于元素 arr1[i] ,不存在任何元素 arr2[j] 满足 |arr1[i]-arr2[j]| <= d 。 示例 1: 输入:arr1 = [4,5,8], arr2 = [10,9,1,8], d = 2 输出:2 解释: 对于 arr1[0]=4 我们有: |4-10|=6 > d=2 |4-9|=5 > d=2 |4-1|=3 > d=2 |4-8|=4…
leetcode.com 2026-11-05
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
find-the-distance-value-between-two-arrays
Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The distance value is defined as the number of elements arr1[i] such that there is not any element arr2[j] where |arr1[i]-arr2[j]| <= d. Example…
leetcode.cn 2026-11-06
🟡2747.count-zero-request-servers
🏷️ Tags
#array #hash_table #sorting #sliding_window
🟡2747.count-zero-request-servers
🏷️ Tags
#array #hash_table #sorting #sliding_window
Telegraph
count-zero-request-servers
给你一个整数 n ,表示服务器的总数目,再给你一个下标从 0 开始的 二维 整数数组 logs ,其中 logs[i] = [server_id, time] 表示 id 为 server_id 的服务器在 time 时收到了一个请求。 同时给你一个整数 x 和一个下标从 0 开始的整数数组 queries 。 请你返回一个长度等于 queries.length 的数组 arr ,其中 arr[i] 表示在时间区间 [queries[i] - x, queries[i]] 内没有收到请求的服务器数目。…
leetcode.com 2026-11-06
🟡2747.count-zero-request-servers
🏷️ Tags
#array #hash_table #sorting #sliding_window
🟡2747.count-zero-request-servers
🏷️ Tags
#array #hash_table #sorting #sliding_window
Telegraph
count-zero-request-servers
You are given an integer n denoting the total number of servers and a 2D 0-indexed integer array logs, where logs[i] = [server_id, time] denotes that the server with id server_id received a request at time time. You are also given an integer x and a 0-indexed…
leetcode.cn 2026-11-08
🟡1267.count-servers-that-communicate
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #array #counting #matrix
🟡1267.count-servers-that-communicate
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #array #counting #matrix
Telegraph
count-servers-that-communicate
这里有一幅服务器分布图,服务器的位置标识在 m * n 的整数矩阵网格 grid 中,1 表示单元格上有服务器,0 表示没有。 如果两台服务器位于同一行或者同一列,我们就认为它们之间可以进行通信。 请你统计并返回能够与至少一台其他服务器进行通信的服务器的数量。 示例 1: 输入:grid = [[1,0],[0,1]] 输出:0 解释:没有一台服务器能与其他服务器进行通信。 示例 2: 输入:grid = [[1,0],[1,1]] 输出:3 解释:所有这些服务器都至少可以与一台别的服务器进行通信。…
leetcode.com 2026-11-08
🟡1267.count-servers-that-communicate
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #array #counting #matrix
🟡1267.count-servers-that-communicate
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #array #counting #matrix
Telegraph
count-servers-that-communicate
You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell there is a server and 0 means that it is no server. Two servers are said to communicate if they are on the same row or on the same column.Return…
leetcode.cn 2026-11-09
🔴1606.find-servers-that-handled-most-number-of-requests
🏷️ Tags
#array #ordered_set #simulation #heap_priority_queue
🔴1606.find-servers-that-handled-most-number-of-requests
🏷️ Tags
#array #ordered_set #simulation #heap_priority_queue
Telegraph
find-servers-that-handled-most-number-of-requests
你有 k 个服务器,编号为 0 到 k-1 ,它们可以同时处理多个请求组。每个服务器有无穷的计算能力但是 不能同时处理超过一个请求 。请求分配到服务器的规则如下:
leetcode.com 2026-11-09
🔴1606.find-servers-that-handled-most-number-of-requests
🏷️ Tags
#array #ordered_set #simulation #heap_priority_queue
🔴1606.find-servers-that-handled-most-number-of-requests
🏷️ Tags
#array #ordered_set #simulation #heap_priority_queue
Telegraph
find-servers-that-handled-most-number-of-requests
You have k servers numbered from 0 to k-1 that are being used to handle multiple requests simultaneously. Each server has infinite computational capacity but cannot handle more than one request at a time. The requests are assigned to servers according to…