This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum HTTPStatusCodes: Int { | |
| // 100 Informational | |
| case Continue = 100 | |
| case SwitchingProtocols | |
| case Processing | |
| // 200 Success | |
| case OK = 200 | |
| case Created | |
| case Accepted | |
| case NonAuthoritativeInformation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ACTION = build | |
| AD_HOC_CODE_SIGNING_ALLOWED = NO | |
| ALTERNATE_GROUP = staff | |
| ALTERNATE_MODE = u+w,go-w,a+rX | |
| ALTERNATE_OWNER = grantdavis | |
| ALWAYS_SEARCH_USER_PATHS = NO | |
| ALWAYS_USE_SEPARATE_HEADERMAPS = YES | |
| APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer | |
| APPLE_INTERNAL_DIR = /AppleInternal | |
| APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // My Implementazion, not so performant like the original "CLRS", but less code | |
| public extension Array where Element: Comparable { | |
| private func merge(var l: [Element], var _ r: [Element]) -> [Element] { | |
| var a = [Element]() | |
| for _ in 0..<(l.count + r.count) { | |
| if l.isEmpty || r.isEmpty { | |
| return a + l + r | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: ## MergeSort Algorithm | |
| // Merge Method -> Original from "CLRS" | |
| public extension Array where Element: Comparable { | |
| private mutating func merge(min min: Int, mid: Int, max: Int) -> [Element] { | |
| var l = Array(self[min...mid]) // self[min...mid].map{$0} | |
| var r = Array(self[mid+1...max]) // self[mid+1...max].map{$0} | |
| var i = 0 | |
| var j = 0 |