Honest Take — Before You Begin
Ruby has a beautiful and dangerous relationship with its data structures. Beautiful because Array and Hash are so good, so ergonomic, so well-designed that you can build almost an…
Deeply understand arrays, linked lists, stacks, queues, hash tables, and sets — not just how to use them (you already do), but how they work internally, their memory layout, and their performance characteristics. Implement each from scratch in Ruby.
Ruby's Hash is arguably the most important data structure in Rails. Every params hash, every session, every ActiveRecord attributes hash — they all depend on O(1) average-case lookup. Understanding how hash collisions degrade performance to O(n) explains why choosing good hash keys matters. Understanding how Set is implemented as a Hash with nil values explains why user_ids.to_set.include?(id) is O(1) while user_ids.include?(id) is O(n). These are not academic exercises — they are production performance decisions you make every day.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Ruby has a beautiful and dangerous relationship with its data structures. Beautiful because Array and Hash are so good, so ergonomic, so well-designed that you can build almost an…
Approach: READ cover-to-cover
Approach: READ cover-to-cover
Approach: READ cover-to-cover, CODE ALONG
Approach: READ: Ch 10 (Elementary Data Structures), Ch 11 (Hash Tables)
Work through each item before the checkpoint.
Build a Ruby LRU Cache from scratch using a Hash + Doubly Linked List (no standard library data structures). It must support get(key) in O(1) and put(key, value) in O(1). Write RS…
7 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.