Custom implementations of fundamental data structures and algorithms built from scratch in Ruby. Created to strengthen computer science fundamentals and understand how these structures work under the hood.
This repository contains my implementations of core data structures including linked lists, binary search trees, and hash maps, along with classic sorting algorithms. Each structure is built without using Ruby's built-in data structure classes to develop a deeper understanding of their internal mechanics and time/space complexity.
- Ruby
- Linked List - Singly linked list with insertion, deletion, and traversal methods
- Binary Search Tree (BST) - Self-balancing tree with insert, search, and delete operations
- Hash Map - Custom hash table implementation with collision handling
- Sorting Algorithms - Bubble sort, merge sort, and quicksort implementations
- Recursion Problems - Fibonacci sequence, factorial calculations
- Ruby 3.x
- Clone the repository
git clone https://github.com/roasted-oolong/data-structures-ruby.git
cd data-structures-ruby- Run any file directly
ruby linked_list/linked_list.rb
ruby binary_search_tree/bst.rb
ruby hash_map/hash_map.rb- Each file contains test cases at the bottom demonstrating functionality
Building these data structures from scratch solidified my understanding of pointers, memory management, and algorithmic complexity. The binary search tree implementation was particularly challenging. Implementing the balancing logic and recursive traversal methods required careful attention to edge cases and base conditions. This project prepared me for technical interviews by giving me hands-on experience with the structures I'd only studied theoretically.
Jenna Lee - LinkedIn - jennalee.tea@gmail.com
Project Link: https://github.com/roasted-oolong/data-structures-ruby