Skip to content

Commit f161328

Browse files
refactor 1165
1 parent b9d321d commit f161328

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/main/java/com/fishercoder/solutions/_1165.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ public static class Solution1 {
3131
public int calculateTime(String keyboard, String word) {
3232
int time = 0;
3333
int fromIndex = 0;
34-
int fingerMoves;
3534
for (char c : word.toCharArray()) {
36-
fingerMoves = Math.abs(fromIndex - keyboard.indexOf(c));
35+
int fingerMoves = Math.abs(fromIndex - keyboard.indexOf(c));
3736
fromIndex = keyboard.indexOf(c);
3837
time += fingerMoves;
3938
}

src/test/java/com/fishercoder/_1165Test.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
public class _1165Test {
1010
private static _1165.Solution1 solution1;
11-
private static int[] nums;
1211

1312
@BeforeClass
1413
public static void setup() {

0 commit comments

Comments
 (0)