Welcome
I found this neat little python modul called algorithms and thought I would rewrite it in Rust.
The official github repository can be found here at algorithms.
If you want to install it directly from here use the following commands.
If you want to use it in your project use the following commands. It is published on crates.io
Stack
- is_consecutive
- is_sorted
- longest_path
- ordered stack
- remove_min
- simplify_path
- slutter
- switch_pairs
String
- add binary
- alphabet board path
- atbash cipher
- breaking bad
- caesar cipher
- check pangram
- contain string
- count binary substring
- decode string
- delete reoccuring
- domain name
- encode decode
- first unique character
- fizzbuzz
- group anagrams
- int to romans
- is palindrome
- is rotated
- judge circle
- knuth morris pratt
- license number
- longest common prefix
- longest palindromic substring
- make sentence
- manarcher
- merge string checker
- min distance
- multiply strings
- is one edit
- panagram
- rabin karp
- repeat substring
- reverse string
- reverse vowels
- reverse words
- roman to int
- rotate
- strip url params
- strong password
- swap characters
- text justification
- convert morse
- validate coordinates
- word squares
- z_algorithm
Map
- is anagram
- is isomorphic
- longest common subsequence
- longest palindromic subsequence
- is valid sudoku
- word pattern
- repeat string
Queue
- max sliding window
- moving average
- reconstruct queue
- zigzagiterator
Sorting
The following algorithms are implemented:
- bubble sort
- bead sort
- heap sort
- counting sort
- cycle sort
- shell sort
- quick sort
- bitonic sort
- bogo sort
- bucket sort
- cocktail shaker sort
- comb sort
- exchange sort
- gnome sort
- heap sort
- meeting rooms sort
- merge sort
- pancake sort
- pigeonhole sort
- radix sort
- selection sort
- color sort
- stooge sort
- wiggle sort
Arrays
The following algorithms are implemented:
- flatten
- delete nth
- delete nth naive
- garage
- Josephus
- limit
- longest non repeat
- max ones index
- missing ranges
- move zeros
- merge intervals
- plus one
- remove duplicates
- rotate
- summarize ranges
- three sum
- top 1
- trimmean
- two sum
- n sum
Set
The following is implemented:
- find keyboard row
- randomized set
- set covering
[!WARNING] This is still in progress.