We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 709d91d commit 7030bb4Copy full SHA for 7030bb4
src/main/java/com/thealgorithms/arrays/MaximumElement.java
@@ -1,5 +1,16 @@
1
package com.thealgorithms.arrays;
2
+
3
+/**
4
+ * This class provides a method to find the maximum element in an array.
5
+ */
6
public class MaximumElement {
7
8
+ /**
9
+ * Finds the maximum value in the given array.
10
+ *
11
+ * @param arr the input array
12
+ * @return the maximum element in the array
13
14
public static int findMax(int[] arr) {
15
int max = Integer.MIN_VALUE;
16
0 commit comments