Here you'll find implementations of popular algorithms and data structures in everyone's favorite new language Swift, with detailed explanations of how they work.
If you're a computer science student who needs to learn this stuff for exams -- or if you're a self-taught programmer who wants to brush up on the theory behind your craft -- you've come to the right place!
The goal of this project is to explain how algorithms work. The focus is on clarity and readability of the code, not on making a reusable library that you can drop into your own projects. That said, most of the code should be ready for production use but you may need to tweak it to fit into your own codebase.
All code is compatible with Xcode 7.3 and Swift 2.2. We'll keep this updated with the latest version of Swift.
This is a work in progress. More algorithms will be added soon. :-)
😍 Suggestions and contributions are welcome! 😍
[What are algorithms and data structures?](What are Algorithms.markdown) Pancakes!
[Why learn algorithms?](Why Algorithms.markdown) Worried this isn't your cup of tea? Then read this.
[Big-O notation](Big-O Notation.markdown). We often say things like, "This algorithm is O(n)." If you don't know what that means, read this first.
[Algorithm design techniques](Algorithm Design.markdown). How do you create your own algorithms?
[How to contribute](How to Contribute.markdown). Report an issue to leave feedback, or submit a pull request.
< 8000 div class="markdown-heading" dir="auto">