We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9d321d commit f161328Copy full SHA for f161328
src/main/java/com/fishercoder/solutions/_1165.java
@@ -31,9 +31,8 @@ public static class Solution1 {
31
public int calculateTime(String keyboard, String word) {
32
int time = 0;
33
int fromIndex = 0;
34
- int fingerMoves;
35
for (char c : word.toCharArray()) {
36
- fingerMoves = Math.abs(fromIndex - keyboard.indexOf(c));
+ int fingerMoves = Math.abs(fromIndex - keyboard.indexOf(c));
37
fromIndex = keyboard.indexOf(c);
38
time += fingerMoves;
39
}
src/test/java/com/fishercoder/_1165Test.java
@@ -8,7 +8,6 @@
8
9
public class _1165Test {
10
private static _1165.Solution1 solution1;
11
- private static int[] nums;
12
13
@BeforeClass
14
public static void setup() {
0 commit comments