Hands-on Ruby implementations of core data structures, algorithms, and small projects.
The goal is to learn by building: every topic includes real implementations, tests, and notes explaining design choices, trade-offs, and behaviour.
- Linked list
- Binary tree
- Red-black tree (insert guide and visualisations)
- Hash tables: chaining vs open addressing + benchmarks
- Graph traversal: BFS & DFS with runnable examples
- Sorting algorithms + benchmark script
- Interpolation search
Ruby 3.x recommended. RSpec is used for specs.
Examples:
- Run a benchmark:
ruby data_structures_and_algorithms/hash_table/benchmark_hash_tables.rb - Run specs:
rspec data_structures_and_algorithms/graph_traversal/graph_spec.rb
Some folders include their own notes / READMEs with deeper explanations.
This repo is about exploration and building solid engineering foundations through code.