์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- ๋ฐฑํธ๋ํน
- ์ฝํ
- ๋ฌธ์์ด
- ๋นํธ์ฐ์ฐ์
- ์คํ
- ์ด์งํ์
- ๋ถํ ์ ๋ณต
- ํ๋ก๊ทธ๋๋จธ์ค
- ๋ธ๋ฃจํธํฌ์ค ์๊ณ ๋ฆฌ์ฆ
- ์ ํด๋ฆฌ๋ ํธ์ ๋ฒ
- ๋์ ํฉ
- ์ฝ๋ฉํ ์คํธ
- dfs
- SwiftUI
- dp
- ๋ถํ ํ์
- ์๊ณ ๋ฆฌ์ฆ
- BFS
- ๊ทธ๋ฆฌ๋ ์๊ณ ๋ฆฌ์ฆ
- Queue
- WebApp
- WebView
- Swift
- ios
- ์์
- ๋ธ๋ฃจํธํฌ์ค
- ๋ฐฑ์ค
- ๋ถํ ์ ๋ณต
- Today
- Total
๋ชฉ๋ก๐ค ์๊ณ ๋ฆฌ์ฆ/programmers (201)
MUKER_DEV with iOS
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ์ฑ๊ณต ํ์ด func solution(_ bridge_length:Int, _ weight:Int, _ truck_weights:[Int]) -> Int { var bridge = Array(repeating: 0, count: bridge_length) var trucks = Array(truck_weights.reversed()) var time = 0 var bridgeWeight = 0 var pointer = 0 while !trucks.isEmpty { time += 1 bridgeWeight -=..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ์ฑ๊ณต ํ์ด func solution(_ numbers:[Int]) -> [Int] { var stack = [Int]() var result = Array(repeating: 0, count: numbers.count) for i in (0..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ์คํจ ํ์ด func solution(_ numbers:[Int64]) -> [Int64] { return numbers.map { var n = $0 + 1 for i in n... { if (i^$0).nonzeroBitCount [Int64] { return numbers.map { let next = ~$0 & ($0+1) return ($0 | next) & ~(next >> 1) } } ํ์ด ํค์๋ ๋นํธ์ฐ์ฐ์ ๋นํธ๊ฐ 2๊ฐ ์ดํ๋ก ๋ค๋ฅธ ์ ์ค ์ ์ผ ์์ ์๋ฅผ ๊ตฌํ๋ ๋ฐฉ๋ฒ์ ๋นํธ์ ์ ์ผ ์ค๋ฅธ์ชฝ 0์ด 1๋ก..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด func solution(_ m:Int, _ n:Int, _ board:[String]) -> Int { var blocks = board.map { $0.map { String($0) } } let searchY = [0,1,1] let searchX = [1,0,1] var erased = [(Int,Int)]() repeat { erased = [] for cycleY in (0..= 3 { erased.append((cycleY,cycleX)) } } } for i in erased { //..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด func solution(_ word:String) -> Int { let alphabet = ["A","E","I","O","U"] var arr = [String]() func DFS(_ s: String) { arr.append(s) if s.count == alphabet.count { return } for i in 0..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด import Foundation func solution(_ files:[String]) -> [String] { var dic = [Int: [String]]() files.enumerated().forEach { index, str in let head = str[str.startIndex..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด func solution(_ dirs:String) -> Int { var now = (0,0) var visited = Set() for i in dirs { var move = (0,0) var new = (0,0) switch i { case "U": move = (1,0) case "D": move = (-1,0) case "L": move = (0,-1) case "R": move = (0,1) default: break } new.0 = now.0 + move.0 new.1 = now.1..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด func solution(_ skill:String, _ skill_trees:[String]) -> Int { let skillOrder = Array(skill) var count = 0 for i in skill_trees { let skill = i.filter { skillOrder.contains($0) } if String(skillOrder[0..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด func solution(_ land:[[Int]]) -> Int{ var myland = land for i in 1..
ํ๋ก๊ทธ๋๋จธ์ค ์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์ ๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์ ๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์. programmers.co.kr ๋์ ํ์ด import Foundation func solution(_ fees:[Int], _ records:[String]) -> [Int] { var enterTime = [String: String]() // ์ถ์ ์๊ฐ var totalTime = [String: Int]() // ๋์ ์ฃผ์ฐจ์๊ฐ var result = [Int]() // ์๊ธ์ ์ฐ for i in records { // ์ฃผ์ฐจ์๊ฐ ๊ณ์ฐ let record = i.split(separator: " ").map { String($0) } if r..