일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
- 티스토리챌린지
- APNS
- modern concurrency
- 야곰 # 야곰아카데미커리어스타터캠프 #iOS개발자 # 부트캠프
- WWDC
- SWIFT
- 오블완
- ios
- modern concurrency deep dive
- Today
- Total
목록코딩테스트 (16)
Geon
코드 import Foundation func solution(_ id_list:[String], _ report:[String], _ k:Int) -> [Int] { var dict: [String: [String]] = [:] var result = Array(repeating: 0, count: id_list.count) var countDict: [String:Int] = [:] for (index, id) in id_list.enumerated() { countDict[id] = index } for repo in report { let arr = repo.split(separator: " ").compactMap {String($0)} let beAccused = arr[1] let accus..
코드 func solution(_ lottos:[Int], _ win_nums:[Int]) -> [Int] { let unKnown = lottos.filter { $0 == 0}.count let dupliacte = win_nums.filter { lottos.contains($0)}.count return [unKnown + dupliacte , dupliacte].map { $0
해결코드 func solution(_ new_id:String) -> String { //1단계 let input = new_id.lowercased() // 2단계 var result = "" for i in input { if i.isLetter || i.isNumber || i == "-" || i == "_" || i == "." { result += String(i) } } // 3단계 while result.contains("..") { result = result.replacingOccurrences(of: "..", with: ".") } //4단계 while result.hasPrefix(".") { result.removeFirst() } while result.hasSuffix("."..
해결 코드 func solution(_ s:String) -> Int { let array = ["zero", "one","two","three","four","five","six","seven","eight","nine"] var result = s for i in 0.. Int { var result = s result = result.replacingOccurrences(of: "zero", with: "0") .replacingOccurrences(of: "one", with: "1") .replacingOccurrences(of: "two", with: "2") .replacingOccurrences(of: "three", with: "3") .replacingOccurrences(of: "fo..