Skip to content

Commit 8e85522

Browse files
authored
Update Maximum.swift
1 parent ded16b8 commit 8e85522

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Select Minimum Maximum/Maximum.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Finds the maximum value in an array in O(n) time.
33
*/
44

5-
func maximum1<T: Comparable>(_ array: [T]) -> T? {
5+
func maximum<T: Comparable>(_ array: [T]) -> T? {
66
guard var maximum = array.first else { return nil }
77

88
for element in array.dropFirst() {

0 commit comments

Comments
 (0)