Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djo/algorithms
Basic Algorithms written in Ruby
https://github.com/djo/algorithms
Last synced: 7 days ago
JSON representation
Basic Algorithms written in Ruby
- Host: GitHub
- URL: https://github.com/djo/algorithms
- Owner: djo
- Created: 2013-12-07T22:09:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T08:03:23.000Z (over 10 years ago)
- Last Synced: 2024-11-01T22:38:22.586Z (14 days ago)
- Language: Ruby
- Size: 225 KB
- Stars: 72
- Watchers: 7
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Basic Algorithms written in Ruby
[![Build Status](https://secure.travis-ci.org/Djo/algorithms.png "Build Status")](http://travis-ci.org/Djo/algorithms)#### Fundamentals
* [The greatest common divisor](lib/gcd.rb)
* [Transpose of a matrix in Linear Algebra](lib/matrix.rb)
* [Find the k-th smallest value in the array](lib/find_kth.rb)
* [Work with a linked list](lib/linked_list.rb)
* [Dijkstra's two-stack algorithm for expression evaluation](lib/expressions.rb)
* [Union-find algorithm (weighted quick-union implementation)](lib/union_find.rb)#### Sorting
* [Selection sort](lib/selection_sort.rb)
* [Insertion sort](lib/insertion_sort.rb)
* [Shell sort](lib/shell_sort.rb)
* [Top-down mergesort](lib/merge_sort.rb)
* [Bottom-up mergesort of a linked list](lib/merge_sort_bu.rb)
* [Quick sort](lib/quick_sort.rb)
* [Quick 3-way sort](lib/quick3way_sort.rb)
* [Heap sort](lib/heap_sort.rb)
* [Max-oriented priority queue](lib/priority_queue.rb)#### Searching
* [Check if a binary tree is balanced](lib/btree.rb)
* [Find the 'next' node (in-order successor) of a given node in a binary search tree](lib/bst.rb)#### Graphs
* [Depth-first search](lib/dfs.rb)
* [Finding a directed cycle](lib/directed_cycle.rb)#### Strings
* [Least-significant-digit first string sort](lib/lsd.rb)
Development:
bundle install
bundle exec rake testCopyright (C) 2013-2014 [Andrew Djoga](http://andrewdjoga.com), released under the MIT license.