Skip to content

Commit 12b0bdb

Browse files
authored
Update README.markdown
update some details
1 parent 10615df commit 12b0bdb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Select Minimum Maximum/README.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ array.minElement() // This will return 3
6868
array.maxElement() // This will return 9
6969
```
7070

71+
```
72+
let array = [ 8, 3, 9, 4, 6 ]
73+
//swift3
74+
array.min() // This will return 3
75+
array.max() // This will return 9
76+
```
77+
7178
## Maximum and minimum
7279

7380
To find both the maximum and minimum values contained in array while minimizing the number of comparisons we can compare the items in pairs.

0 commit comments

Comments
 (0)