Shivam Patel před 6 roky
rodič
revize
b67139f93e

+ 2
- 2
src/main/java/com/zipcodewilmington/arrayutility/ArrayUtility.java Zobrazit soubor

@@ -43,11 +43,11 @@ public class ArrayUtility<shivam> {
43 43
         shivam common = newArr[0];
44 44
         int count = 1;
45 45
         shivam temp;
46
-        int tempCount = 0;
46
+        int tempCount;
47 47
 
48 48
         for (int i = 0; i < (newArr.length - 1); i++) {
49 49
             temp = newArr[i];
50
-
50
+            tempCount = 0;
51 51
             for (int j = 1; j < newArr.length; j++) {
52 52
                 if (temp == newArr[j])
53 53
                     tempCount++;

+ 1
- 0
src/test/java/com/zipcodewilmington/arrayutility/GetMostCommonFromMergeTest.java Zobrazit soubor

@@ -9,6 +9,7 @@ import org.junit.Test;
9 9
 
10 10
 
11 11
 public class GetMostCommonFromMergeTest {
12
+
12 13
     @Test
13 14
     public void integerTest() {
14 15
         // Given