Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Coding Interview University | 268,327 | a day ago | 57 | cc-by-sa-4.0 | ||||||
A complete computer science study plan to become a software engineer. | ||||||||||
Javascript Algorithms | 175,417 | 4 | 10 days ago | 4 | June 02, 2018 | 340 | mit | JavaScript | ||
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings | ||||||||||
Fucking Algorithm | 119,578 | 11 days ago | 360 | Markdown | ||||||
刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why. | ||||||||||
Interviews | 60,220 | 2 months ago | 113 | mit | Java | |||||
Everything you need to know to get the job. | ||||||||||
Java | 53,776 | 16 hours ago | 26 | mit | Java | |||||
All Algorithms implemented in Java | ||||||||||
Leetcode | 52,422 | 15 days ago | 7 | other | JavaScript | |||||
LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。) | ||||||||||
Algorithm Visualizer | 42,745 | 5 months ago | 58 | mit | JavaScript | |||||
:fireworks:Interactive Online Platform that Visualizes Algorithms from Code | ||||||||||
Hello Algo | 35,604 | 19 hours ago | 19 | other | Java | |||||
《Hello 算法》:动画图解、一键运行的数据结构与算法教程,支持 Java, C++, Python, Go, JS, TS, C#, Swift, Rust, Dart, Zig 等语言。 | ||||||||||
Interview | 29,284 | 3 months ago | 15 | other | C++ | |||||
📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc. | ||||||||||
Javascript | 28,287 | 15 hours ago | 40 | gpl-3.0 | JavaScript | |||||
Algorithms and Data Structures implemented in JavaScript for beginners, following best practices. |
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.
Code is compatible with Xcode 10 and Swift 4.2. We'll keep this updated with the latest version of Swift. If you're interested in a GitHub pages version of the repo, check out this.
😍 Suggestions and contributions are welcome! 😍
What are algorithms and data structures? Pancakes!
Why learn algorithms? Worried this isn't your cup of tea? Then read this.
Big-O notation. We often say things like, "This algorithm is O(n)." If you don't know what that means, read this first.
Algorithm design techniques. How do you create your own algorithms?
How to contribute. Report an issue to leave feedback, or submit a pull request.
If you're new to algorithms and data structures, here are a few good ones to start out with:
It's fun to see how sorting algorithms work, but in practice you'll almost never have to provide your own sorting routines. Swift's own sort()
is more than up to the job. But if you're curious, read on...
Basic sorts:
Fast sorts:
Hybrid sorts:
Special-purpose sorts:
Bad sorting algorithms (don't use these!):
The choice of data structure for a particular task depends on a few things.
First, there is the shape of your data and the kinds of operations that you'll need to perform on it. If you want to look up objects by a key you need some kind of dictionary; if your data is hierarchical in nature you want a tree structure of some sort; if your data is sequential you want a stack or queue.
Second, it matters what particular operations you'll be performing most, as certain data structures are optimized for certain actions. For example, if you often need to find the most important object in a collection, then a heap or priority queue is more optimal than a plain array.
Most of the time using just the built-in Array
, Dictionary
, and Set
types is sufficient, but sometimes you may want something more fancy...
A lot of software developer interview questions consist of algorithmic puzzles. Here is a small selection of fun ones. For more puzzles (with answers), see here and here.
Like what you see? Check out Data Structures & Algorithms in Swift, the official book by the Swift Algorithm Club team!
Youll start with the fundamental structures of linked lists, queues and stacks, and see how to implement them in a highly Swift-like way. Move on to working with various types of trees, including general purpose trees, binary trees, AVL trees, binary search trees, and tries.
Go beyond bubble and insertion sort with better-performing algorithms, including mergesort, radix sort, heap sort, and quicksort. Learn how to construct directed, non-directed and weighted graphs to represent many real-world models, and traverse graphs and trees efficiently with breadth-first, depth-first, Dijkstras and Prims algorithms to solve problems such as finding the shortest path or lowest cost in a network.
By the end of this book, youll have hands-on experience solving common issues with data structures and algorithms and youll be well on your way to developing your own efficient and useful implementations!
You can find the book on the raywenderlich.com store.
The Swift Algorithm Club was originally created by Matthijs Hollemans.
It is now maintained by Vincent Ngo, Kelvin Lau, and Richard Ash.
The Swift Algorithm Club is a collaborative effort from the most algorithmic members of the raywenderlich.com community. We're always looking for help - why not join the club? :]
All content is licensed under the terms of the MIT open source license.
By posting here, or by submitting any pull request through this forum, you agree that all content you submit or create, both code and text, is subject to this license. Razeware, LLC, and others will have all the rights described in the license regarding this content. The precise terms of this license may be found here.