Skip to content

Instantly share code, notes, and snippets.

@kinduff
Created July 30, 2015 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinduff/b458c22b2c83d7316819 to your computer and use it in GitHub Desktop.
Save kinduff/b458c22b2c83d7316819 to your computer and use it in GitHub Desktop.
class LinkedList
#...
end
class Node
#...
end
class HashTable
def initialize(size)
@size = size
@buckets = Array.new(@size)
0.upto(@size) do |i|
@buckets[i] = LinkedList.new
end
end
def add(value)
#...
end
def hash(value)
#...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment