All Projects → EbTech → Rust Algorithms

EbTech / Rust Algorithms

Licence: mit
Common data structures and algorithms in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rust Algorithms

Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (-86.53%)
Mutual labels:  programming-contests, algorithm, algorithms, data-structures
Coding Problems
Solutions for various coding/algorithmic problems and many useful resources for learning algorithms and data structures
Stars: ✭ 2,221 (-23.89%)
Mutual labels:  algorithms, data-structures, education, learn
Data Structures And Algorithms
A collection of some implementations of data structures and algorithms.
Stars: ✭ 101 (-96.54%)
Mutual labels:  codeforces, algorithm, algorithms, data-structures
Usaco Guide
A free collection of curated, high-quality resources to take you from Bronze to Platinum and beyond.
Stars: ✭ 439 (-84.96%)
Mutual labels:  codeforces, programming-contests, algorithm, education
Competitive Programming
Hello Programmers 💻 , A one-stop Destination✏️✏️ for all your Competitive Programming Resources.📗📕 Refer CONTRIBUTING.md for contributions
Stars: ✭ 113 (-96.13%)
Mutual labels:  codeforces, algorithms, data-structures
Algorithms
Algorithms and data structures implemented in JavaScript with explanations, for further readings
Stars: ✭ 99 (-96.61%)
Mutual labels:  algorithm, algorithms, data-structures
Hackerrank
📗 Solutions of more than 380 problems of Hackerrank accross several domains.
Stars: ✭ 128 (-95.61%)
Mutual labels:  algorithm, algorithms, data-structures
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (-95.24%)
Mutual labels:  algorithm, algorithms, data-structures
E Maxx Eng
Translation of http://e-maxx.ru into English
Stars: ✭ 1,238 (-57.57%)
Mutual labels:  programming-contests, algorithms, data-structures
Data structure and algorithms library
A collection of classical algorithms and data-structures implementation in C++ for coding interview and competitive programming
Stars: ✭ 133 (-95.44%)
Mutual labels:  algorithm, algorithms, data-structures
Ultimate Java Resources
Java programming. All in one Java Resource for learning. Updated every day and up to date. All Algorithms and DS along with Development in Java. Beginner to Advanced. Join the Discord link.
Stars: ✭ 143 (-95.1%)
Mutual labels:  algorithms, data-structures, learn
Competitive Programming
My solutions to problems from various competitive programming websites.
Stars: ✭ 93 (-96.81%)
Mutual labels:  programming-contests, algorithm, data-structures
Jsav
JavaScript Algorithm Visualization library
Stars: ✭ 87 (-97.02%)
Mutual labels:  algorithm, data-structures, education
C
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
Stars: ✭ 11,897 (+307.71%)
Mutual labels:  algorithms, data-structures, education
C Plus Plus
Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
Stars: ✭ 17,151 (+487.77%)
Mutual labels:  algorithm, algorithms, data-structures
Data Structures Algorithms
Your personal library of every algorithm and data structure code that you will ever encounter
Stars: ✭ 157 (-94.62%)
Mutual labels:  algorithm, algorithms, data-structures
Rethink C
A reuseable codebase for C Programming Language.
Stars: ✭ 241 (-91.74%)
Mutual labels:  algorithm, algorithms, data-structures
Data Structures And Algorithms
Data Structures and Algorithms implementation in Go
Stars: ✭ 2,272 (-22.14%)
Mutual labels:  algorithm, algorithms, data-structures
Usaco
General Resources for Competitive Programming
Stars: ✭ 1,152 (-60.52%)
Mutual labels:  codeforces, programming-contests, algorithm
Algorithmic Toolbox San Diego
✔ My Solutions of (Algorithmic-Toolbox ) Assignments from Coursera ( University of California San Diego ) With "Go In Depth" Part Which Contains More Details With Each of The Course Topics
Stars: ✭ 78 (-97.33%)
Mutual labels:  algorithm, algorithms, data-structures

Contest Algorithms in Rust

Crates.io Version Documentation license Crates.io Downloads Build Status Gitter

A collection of classic data structures and algorithms, emphasizing usability, beauty and clarity over full generality. As such, this should be viewed not as a blackbox library, but as a whitebox cookbook demonstrating the design and implementation of algorithms. I hope it will be useful to students and educators, as well as fans of algorithmic programming contests.

This repository is distributed under the MIT License. Contest submissions need not include the license text. Enjoy!

For Students and Educators

When learning a new algorithm or data structure, it's often helpful to see or play with a concrete implementation. As such, this repository catalogues several classic algorithms in their simplest forms.

In addition, the Rust language has outstanding pedagogical attributes. Its compiler acts as a teacher, enforcing strict discipline while pointing to clearer ways to structure one's logic.

For Programming Contests

The original intent of this project was to build a reference for use in programming contests. As a result, it contains algorithms that are frequently useful to have in one's toolkit, with an emphasis on code that is concise and easy to modify under time pressure.

Most competitive programmers rely on C++ for its fast execution time. However, it's notoriously unsafe, diverting a considerable share of the contestant's time and attention on mistake prevention and debugging. Java is the next most popular choice, offering a little safety at some expense to speed of coding and execution.

To my delight, I found that Rust eliminates entire classes of bugs, while reducing visual clutter to make the rest easier to spot. And, it's fast. There's a learning curve, to be sure. However, a proficient Rust programmer stands to gain a competitive advantage as well as a more pleasant experience!

Some contest sites and online judges that support Rust:

The following support pre-2018 versions of Rust:

For help in getting started, you may check out some of my past submissions.

Programming Language Advocacy

My other goal is to appeal to developers who feel limited by ancient (yet still mainstream) programming languages, by demonstrating the power of modern techniques.

Rather than try to persuade you with words, this repository aims to show by example. If you'd like to learn the language, I recommend the official book or Programming Rust.

Contents

Graphs

Graph representations

  • Integer index-based adjacency list representation
  • Disjoint set union

Elementary graph algorithms

  • Euler path and tour
  • Kruskal's minimum spanning tree
  • Dijkstra's single-source shortest paths
  • DFS pre-order traversal

Connected components

  • Connected components
  • Strongly connected components
  • Bridges and 2-edge-connected components
  • Articulation points and 2-vertex-connected components
  • Topological sort
  • 2-SAT solver

Network flows

  • Dinic's blocking maximum flow
  • Minimum cut
  • Hopcroft-Karp bipartite matching
  • Minimum cost maximum flow

Math

Number theory

  • Greatest common divisor
  • Canonical solution to Bezout's identity
  • Miller's primality test

Generic FFT

  • Fast Fourier transform
  • Number theoretic transform
  • Convolution

Arithmetic

  • Rational numbers
  • Complex numbers
  • Linear algebra
  • Safe modular arithmetic

Ordering and search

  • Comparator for PartialOrd
  • Binary search: drop-in replacements for C++ lower_bound()/upper_bound()
  • Merge and mergesort
  • Coordinate compression
  • Online convex hull trick (update and query the upper envelope of a set of lines)

Associative range query

  • Statically allocated binary indexed ARQ tree (a.k.a. generic segtree with lazy propagation)
  • Dynamically allocated ARQ tree, optionally sparse and persistent
  • Mo's algorithm (a.k.a. query square root decomposition)

Scanner

  • Utility for reading input data ergonomically
  • File and standard I/O examples

String processing

  • Generic trie
  • Knuth-Morris-Pratt single-pattern string matching
  • Aho-Corasick multi-pattern string matching
  • Suffix array: O(n log n) construction using counting sort
  • Longest common prefix
  • Manacher's linear-time palindrome search
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].