You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Question_List_3001_4000.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,7 @@
132
132
| 3375 |[Minimum Operations to Make Array Values Equal to K](https://leetcode.com/problems/minimum-operations-to-make-array-values-equal-to-k)|[Python](./Python/3375-minimum-operations-to-make-array-values-equal-to-k.py)|[Easy](./Readme/3375-minimum-operations-to-make-array-values-equal-to-k.md)|
| 3380 |[Maximum Area Rectangle With Point Constraints I](https://leetcode.com/problems/maximum-area-rectangle-with-point-constraints-i)|[Python](./Python/3380-maximum-area-rectangle-with-point-constraints-i.py)|[Medium](./Readme/3380-maximum-area-rectangle-with-point-constraints-i.md)|
135
+
| 3381 |[Maximum Subarray Sum with Length Divisible by K](https://leetcode.com/problems/maximum-subarray-sum-with-length-divisible-by-k)|[Python](./Python/3381-maximum-subarray-sum-with-length-divisible-by-k.py)|[Medium](./Readme/3381-maximum-subarray-sum-with-length-divisible-by-k.md)|
135
136
| 3386 |[Button With Longest Push Time](https://leetcode.com/problems/button-with-longest-push-time)|[Python](./Python/3386-button-with-longest-push-time.py)|[Easy](./Readme/3386-button-with-longest-push-time.md)|
136
137
| 3387 |[Maximize Amount After Two Days of Conversions](https://leetcode.com/problems/maximize-amount-after-two-days-of-conversions)|[Python](./Python/3387-maximize-amount-after-two-days-of-conversions.py)|[Medium](./Readme/3387-maximize-amount-after-two-days-of-conversions.md)|
137
138
| 3392 |[Count Subarrays of Length Three with a Condition](https://leetcode.com/problems/count-subarrays-of-length-three-with-a-condition)|[Python](./Python/3392-count-subarrays-of-length-three-with-a-condition.py)|[Easy](./Readme/3392-count-subarrays-of-length-three-with-a-condition.md)|
Copy file name to clipboardExpand all lines: Readme/2872-maximum-number-of-k-divisible-components.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<h2><ahref="https://leetcode.com/problems/maximum-number-of-k-divisible-components/">2872. Maximum Number of K-Divisible Components</a></h2><h3>Hard</h3><hr><div><p>There is an undirected tree with <code>n</code> nodes labeled from <code>0</code> to <code>n - 1</code>. You are given the integer <code>n</code> and a 2D integer array <code>edges</code> of length <code>n - 1</code>, where <code>edges[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> indicates that there is an edge between nodes <code>a<sub>i</sub></code> and <code>b<sub>i</sub></code> in the tree.</p>
1
+
<h2><ahref="https://leetcode.com/problems/maximum-number-of-k-divisible-components">3058. Maximum Number of K-Divisible Components</a></h2><h3>Hard</h3><hr><p>There is an undirected tree with <code>n</code> nodes labeled from <code>0</code> to <code>n - 1</code>. You are given the integer <code>n</code> and a 2D integer array <code>edges</code> of length <code>n - 1</code>, where <code>edges[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> indicates that there is an edge between nodes <code>a<sub>i</sub></code> and <code>b<sub>i</sub></code> in the tree.</p>
2
2
3
3
<p>You are also given a <strong>0-indexed</strong> integer array <code>values</code> of length <code>n</code>, where <code>values[i]</code> is the <strong>value</strong> associated with the <code>i<sup>th</sup></code> node, and an integer <code>k</code>.</p>
<strong>Input:</strong> n = 7, edges = [[0,1],[0,2],[1,3],[1,4],[2,5],[2,6]], values = [3,0,6,1,5,2,1], k = 3
22
24
<strong>Output:</strong> 3
23
25
<strong>Explanation:</strong> We remove the edge connecting node 0 with 2, and the edge connecting node 0 with 1. The resulting split is valid because:
24
26
- The value of the component containing node 0 is values[0] = 3.
@@ -41,4 +43,3 @@ It can be shown that no other valid split has more than 3 connected components.
41
43
<li>Sum of <code>values</code> is divisible by <code>k</code>.</li>
42
44
<li>The input is generated such that <code>edges</code> represents a valid tree.</li>
0 commit comments