https://github.com/rubyonworld/algorithms
Basic Algorithms written in Ruby
https://github.com/rubyonworld/algorithms
algorithm basic beginner language ruby
Last synced: 26 days ago
JSON representation
Basic Algorithms written in Ruby
- Host: GitHub
- URL: https://github.com/rubyonworld/algorithms
- Owner: RubyOnWorld
- Created: 2022-09-27T15:18:29.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-27T16:37:57.000Z (about 3 years ago)
- Last Synced: 2024-12-28T14:26:41.584Z (11 months ago)
- Topics: algorithm, basic, beginner, language, ruby
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Basic Algorithms written in Ruby
[](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 test
Copyright (C) 2013-2014 [Andrew Djoga](http://andrewdjoga.com), released under the MIT license.