Want to help out with the Swift Algorithm Club? Great!
Take a look at the list. Any algorithms or data structures that don't have a link yet are up for grabs.
Algorithms in the Under construction area are being worked on. Suggestions and feedback is welcome!
New algorithms and data structures are always welcome (even if they aren't on the list).
We're always interested in improvements to existing implementations and better explanations. Suggestions for making the code more Swift-like or to make it fit better with the standard library.
Unit tests. Fixes for typos. No contribution is too small. :-)
To keep this a high quality repo, please follow this process when submitting your contribution:
- Create a pull request to "claim" an algorithm or data structure. Just so multiple people don't work on the same thing.
- Use this style guide for writing code (more or less).
- Write an explanation of how the algorithm works. Include plenty of examples for readers to follow along. Pictures are good. Take a look at the explanation of quicksort to get an idea.
- Include your name in the explanation, something like Written by Your Name at the end of the document.
- Add a playground and/or unit tests.
- Run SwiftLint
- Install
- Open terminal and run the
swiftlint
command:
cd path/to/swift-algorithm-club
swiftlint
Just so you know, I will probably edit your text and code for grammar etc, just to ensure a certain level of polish.
For the unit tests:
- Add the unit test project to
.travis.yml
so they will be run on Travis-CI. Add a line to.travis.yml
like this:
- xctool test -project ./Algorithm/Tests/Tests.xcodeproj -scheme Tests
- Configure the Test project's scheme to run on Travis-CI:
- Open Product -> Scheme -> Manage Schemes...
- Uncheck Autocreate schemes
- Check Shared
This isn't just a repo with a bunch of code... If you want to learn more about how an algorithm works or want to discuss better ways of solving problems, then open a Github issue and we'll talk!