Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix max calculation in FindMax.java updated
  • Loading branch information
MuhammadMuneebMubashar authored Feb 12, 2026
commit fc3fdaf1ab02c1c50c63551782039d24aef0cbe7
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/maths/FindMax.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static int findMax(final int[] array) {
}
int max = array[0];
for (int i = 1; i < n; i++) {
max = Math.max(array[i] , array[i+1]);
max = Math.max(array[i] , max);
}
return max;
}
Expand Down
Loading