Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- clean architecture
- swift documentation
- uiscrollview
- 리펙토링
- Xcode
- rxswift
- ribs
- 클린 코드
- collectionview
- map
- MVVM
- Human interface guide
- Clean Code
- tableView
- swiftUI
- Observable
- 리팩토링
- 리펙터링
- RxCocoa
- Refactoring
- 애니메이션
- combine
- HIG
- uitableview
- UITextView
- ios
- UICollectionView
- Protocol
- 스위프트
- SWIFT
Archives
- Today
- Total
목록BFS (1)
김종권의 iOS 앱 개발 알아가기
[swift - algorithm] 순열과 조합 (dfs로 구현), bfs, dfs, 백트래킹, 재귀
순열과 조합 (완전탐색 DFS) - 순열은 (1, 2), (2, 1) 다른 것: 순서도 고려한 것 조합은 (1, 2), (2, 1) 같은 것: 순서는 고려하지 않은 것 - 구현 시 차이점은 for문: 조합: for문 시작점이 dfs에서 들어오는 것 순열: for문 시작점이 0부터 * 데이터 let rawData = "0123" let data = rawData.map { String($0) } var visit = [Bool](repeating: false, count: data.count) 1) 조합 // 4C2 dfs_comb(data: data, curInd: 0, curCnt: 0, targetCnt: 2, answer: "") func dfs_comb(data: [String], curInd: ..
알고리즘
2021. 4. 17. 19:59