New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 3 Migration #181
Comments
I knew this day would come. |
@chris-pilcher Will the Swift 3 implementation override the current implementations? Can we add a folder for each algorithm to organize implementations into Swift 2 and Swift 3? They can share the same Example of folder structure
|
@lostatseajoshua Thanks for the suggestion! I'm keen to have a single version because of the complexity associated with keeping multiple versions. Potential complications/difficulties I can think of:
Overall, I think it would be best to overwrite the current Swift 2 implementations. |
@chris-pilcher Great points! I agree with the difficulties one version will be better. With that point I am going to make a couple PRs to claim some algorithms in Swift 3 👍 |
@kelvinlauKL Linked List was updated with #212 . Can you check it off the todo? |
Red-Black tree can be checked on the list since #214 |
#250 Linked List |
#251 Treap |
Hello @chris-pilcher, I was wondering if the ones that don't have check marks are the ones that still need to be migrated. If so I would be happy to help. |
yep @shashank3369, you're correct. |
#334 Heap Sort |
I'm not familiar enough with github to know how to properly do the pull/push requests, but here's how I'd rewrite the "Comb Sort" algorithm. That 'while' loop that was in there confused the heck out of me. I think this one is much cleaner. func combSort(input: [Int]) -> [Int] {
let shrink = 1.3
var copy = input
var gap = copy.count
while gap > 1 {
gap = max(1, Int(Double(gap) / shrink))
for i in 0 ..< copy.count - gap {
if copy[i] > copy[i + gap] {
swap(©[i], ©[i + gap])
}
}
}
return copy
} |
#343 Shortest Path (Unweighted) |
#345 Minimum Spanning Tree (Unweighted Graph) |
#344 Huffman Coding |
#347 All-Pairs Shortest Paths |
#349 K-Means |
#350 Combsort. |
#352 Ternary Search Tree |
#353 Radix Sort |
All-Pairs Shortest Pairs has been upgraded and merged too (PR #347), so that should be checked of as well, can I do that myself? |
Thanks @pbodsk, updated. |
#356 Single-Source Shortest Paths |
#270 Combinatorics is migrated to swift 3. |
What do we need to migrate in Images? 😀 |
@naeemshaikh90 Good point, also marked combinatorics as migrated. Thanks 👍 |
@kelvinlauKL Just checked, I think Selection Sampling is already written in swift 3. Compiles just fine on my mac. |
@JaapWijnen Thanks for the heads up. |
#364 Run Length Encoding migrated to Swift 3 |
#365 Shunting Yard migrated to Swift 3 |
#366 Set Cover (unweighted) migrated to Swift 3 |
And the last one! #367 |
Wow @JaapWijnen, you're on a roll 👍 I'll review those later, but for now it seems like we're finally done. Thanks everyone! |
And... we're done!
Thanks everyone for pitching in!
Xcode 8 and Swift 3 will be formally released soon and we need to migrate everything to Swift 3.
Want to help out with the migration? Awesome! :]
Please follow this process for migrating to Swift 3
Suggestions and feedback is welcome!
List of algorithms to be migrated to Swift 3
nil
Completed Migrations
The text was updated successfully, but these errors were encountered: