티스토리 뷰

https://stackoverflow.com/questions/24036514/correct-way-to-find-max-in-an-array-in-swift

 

Correct way to find max in an Array in Swift

I've so far got a simple (but potentially expensive) way: var myMax = sort(myArray,>)[0] And how I was taught to do it at school: var myMax = 0 for i in 0..myArray.count { if (myArray[i] ...

stackoverflow.com

 

numbers.max()가 된다. 

스위프트 갓갓 ^^77

 

 

data.values.max()

딕셔너리에서도 쓸 수 있다. 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함