0.0
No commit activity in last 3 years
No release in over 3 years
Useful algorithms for everyday usage implemented using Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 1.3
~> 10.0
>= 0
~> 3.1
~> 0.9
~> 0.8
 Project Readme

Build Status

Algorithmable

Useful algorithms such as Sorting Strategies, Searches and Data Structures such as Priority Queues, Symbol Tables, Binary Search Tree BST, Red Black tree RBT, Hash Tables, Bag, Linked List, Deque, Queue (FIFO), Stack (LIFO), Graphs & Graph Traversal strategies for everyday usage.

Algorithms and Data Structures implemented using Ruby, for fun.

Library also contains solutions for several puzzles solved by implemented algorithms and data structures.

Data Structures

  • Bag (primitive collection without ability to delete elements)
  • Singly Linked List
  • Doubly Linked List
  • Deque (double-ended queue)
  • Queue (FIFO)
  • Stack (LIFO)
  • Ordered Symbol Table BST. Implementation using Unbalanced Binary Search Tree.
  • Minimum Priority Queue
  • Maximum Priority Queue
  • Ordered Symbol Table

Graphs

  • Undirected graph

Graph Traversals

  • Breadth First Search (BFS)
  • Depth First Search (DFS)

Search Algorithms

  • Binary Search

Sorting Algorithms

  • Bubble sort
  • Merge sort
  • Heapsort ( Binary Heap )

Algorithms

Puzzles

  • Shunting-yard algorithm ( Dijkstras two stacks algorithm )
  • Josephus problem

Usage

It is always better to check unit tests in order to understand how things going on. Most of the components are encapsulated through the factory methods, so the are could be mixed to other objects.

Installation

Add this line to your application's Gemfile:

gem 'algorithmable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install algorithmable

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rlishtaba/algorithmable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.