Skip to content

Commit b1e0c33

Browse files
committed
Improved task
1 parent 1f20821 commit b1e0c33

File tree

1 file changed

+0
-2
lines changed
  • src/main/java/g3401_3500/s3420_count_non_decreasing_subarrays_after_k_operations

1 file changed

+0
-2
lines changed

src/main/java/g3401_3500/s3420_count_non_decreasing_subarrays_after_k_operations/Solution.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77

88
public class Solution {
99
public long countNonDecreasingSubarrays(int[] nums, long k) {
10-
// Reverse the array
1110
int n = nums.length;
1211
for (int i = 0; i < n / 2; ++i) {
1312
int temp = nums[i];
1413
nums[i] = nums[n - 1 - i];
1514
nums[n - 1 - i] = temp;
1615
}
17-
1816
long res = 0;
1917
Deque<Integer> q = new ArrayDeque<>();
2018
for (int j = 0, i = 0; j < nums.length; ++j) {

0 commit comments

Comments
 (0)