To begin, I will code several DS's in Ruby.
EDIT I've included RSpec files for ease of testing.
(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.
To run the RSpecs:
- Fork/this repo
- Run
bundle install
in the project directory - In the directory (and outside of
lib
andspec
), runrspec spec/{file_name}_spec.rb
- Enjoy the greenery.
Ideally, I eventually want to double-down and alternatively write them in C.