/data-structures

Data structure implementations

Primary LanguageRuby

=== My studies + implementations of various data structures.

To begin, I will code several DS's in Ruby.
EDIT I've included RSpec files for ease of testing.

Content

(There is no order)

Data Structures

  • Array
    • Static Array
    • Dynamic Array
  • Linked Lists
    • Single Linked List
    • Doubly Linked List
  • HashMap
  • Trees
    • BST

ADT

  • HashSet
  • MaxStack
  • MinMax Stack
    • Built on Arrays
  • MinMax StackQueue
    • MinMax Queue built using MinMax Stacks

Notes

HashMap VS HashSet

A HashMap is an implementation of a Map, where keys are mapped to a values.

A HashSet is an implementation of Set, where each element is unique value.


Testing

To run the RSpecs:

  1. Fork/this repo
  2. Run bundle install in the project directory
  3. In the directory (and outside of lib and spec), run rspec spec/{file_name}_spec.rb
  4. Enjoy the greenery.

Ideally, I eventually want to double-down and alternatively write them in C.