Skip to content

Commit e08408c

Browse files
authored
fix: update FindMin and fix TheAlgorithms#1170
1 parent 8ce3dad commit e08408c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Maths/FindMin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class FindMin {
55
//Driver
66
public static void main(String[] args) {
77
int[] array = {2, 4, 9, 7, 19, 94, 5};
8-
System.out.println("min = " + findMax(array));
8+
System.out.println("min = " + findMin(array));
99
}
1010

1111
/**
@@ -14,7 +14,7 @@ public static void main(String[] args) {
1414
* @param array the array contains element
1515
* @return min value
1616
*/
17-
public static int findMax(int[] array) {
17+
public static int findMin(int[] array) {
1818
int min = array[0];
1919
for (int i = 1; i < array.length; ++i) {
2020
if (array[i] < min) {

0 commit comments

Comments
 (0)