Skip to content

Commit

Permalink
[LEET-3304] fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
fishercoder1534 committed Oct 23, 2024
1 parent 8c80a63 commit de5978b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
public class _848 {
public static class Solution1 {
public String shiftingLetters(String s, int[] shifts) {
long[] preSums = new long[shifts.length]; // use long type to avoid integer addition overflow
long[] preSums =
new long[shifts.length]; // use long type to avoid integer addition overflow
for (int i = shifts.length - 1; i >= 0; i--) {
if (i < shifts.length - 1) {
preSums[i] = preSums[i + 1] + shifts[i];
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/fishercoder/fourththousand/_3304Test.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fishercoder.fourththousand;

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.fishercoder.solutions.fourththousand._3304;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class _3304Test {
private _3304.Solution1 solution1;

Expand Down

0 comments on commit de5978b

Please sign in to comment.