Created
July 30, 2015 00:35
-
-
Save kinduff/b458c22b2c83d7316819 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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