![](http://i1.daumcdn.net/thumb/C148x148.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/qe9pZ/btrQrFx8I6l/Zz86kTOFUgaGeFAZyKecN0/img.png)
https://school.programmers.co.kr/learn/courses/30/lessons/120835 문제 사진 내 풀이 import Foundation func solution(_ emergency:[Int]) -> [Int] { var result: [Int] = [] emergency.map { el in result.append(emergency.filter { $0 > el }.count + 1)} return result } solution([1, 2, 3, 4]) 빈배열을 만들고 (순위를 보여줄 배열) 아래 처럼 루프가 돌아감 ==> el은 처음 루프 (map), e2는 이중 루프 (filter에서 $0) 예) el[0] 와 e2[0], e2[1], e2[2], e2[3] 이런..
알고리즘
2022. 11. 6. 17:54
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Swift RIBs
- swift (programmers)
- Swift
- Swift init
- ios
- 원티드 프리온보딩
- Combine: Asynchronous Programming with Swift
- Swift joined()
- Swift final
- Swift 프로그래머스
- Swift 내림차순
- Swift joined
- RTCCameraVideoCapturer
- 2023년 회고
- removeLast()
- swift reduce
- RIBs tutorial
- swift programmers
- Class
- swift protocol
- Swift inout
- swift 고차함수
- Swift ModernRIBs
- swift property
- iOS error
- Swift 알고리즘
- CS 네트워크
- Swift 프로퍼티
- Swift Leetcode
- Swift Error Handling
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함