Skip to content

Commit 22ed562

Browse files
committed
Fixed sonar
1 parent 071041c commit 22ed562

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/g3601_3700/s3661_maximum_walls_destroyed_by_robots

1 file changed

+2
-2
lines changed

src/main/java/g3601_3700/s3661_maximum_walls_destroyed_by_robots/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private int processMultipleRobots(int[][] arr, int[] walls) {
5656
if (i > 0 && walls[i - 1] == arr[j][0]) {
5757
i--;
5858
}
59-
b = countWallsInRange(walls, i, arr[j][0], arr[j][0] + arr[j][1], arr[j + 1][0]);
59+
b = countWallsInRange(walls, i, arr[j][0] + arr[j][1], arr[j + 1][0]);
6060
i += b;
6161
j++;
6262
while (j < arr.length) {
@@ -84,7 +84,7 @@ private int countWallsUpToRobot(int[] walls, int i, int robotPos) {
8484
return count;
8585
}
8686

87-
private int countWallsInRange(int[] walls, int i, int robotPos, int maxReach, int nextRobot) {
87+
private int countWallsInRange(int[] walls, int i, int maxReach, int nextRobot) {
8888
int count = 0;
8989
while (i + count < walls.length
9090
&& walls[i + count] <= maxReach

0 commit comments

Comments
 (0)