No commit activity in last 3 years
No release in over 3 years
DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.4
~> 3.5
~> 0.49
~> 0.15
~> 0.9
 Project Readme

DataStructures101 Build Status Gem Version Code Climate Test Coverage

DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses. The overall goal of the gem is to provide easy to use functionality (trying to match the behavior of existing structures in Ruby) while providing the user with a framework to test and compare their implementations against.

Installation

Add this line to your application's Gemfile:

gem 'data_structures_101'

And then execute:

$ bundle

Or install it yourself as:

$ gem install data_structures_101

Usage

require 'data_structures_101'

LinkedList example

To create a LinkedList

list = DataStructures101::LinkedList.new

HashTable example

To create a hash table using separate chaining strategy:

hash = DataStructures101::ChainedHashTable.new

Heap example

To create a min heap Heap object

heap = DataStructures101::Heap.new(2,3,1, -10, min_heap: true)

Documentation

The documentation lives at the github pages. For the nitty gritty details of the implementation go to http://www.rubydoc.info/gems/data_structures_101.

You can also go through several posts on https://bitsofknowledge.net where I have discussed the implementations.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add specs for any new or changed functionality and tests it using RSpec.

Bug reports and pull requests are welcome on GitHub at https://github.com/renehernandez/data_structures_101.

License

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