Rename class names

This commit is contained in:
Vitor Oliveira 2021-02-07 10:17:53 -08:00
parent a4b8e1eb15
commit 0624af6cb9
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
class DoubleList
class DoublyLinkedList
# Initialize your data structure here.
attr_reader :head, :tail, :size
@ -165,7 +165,7 @@ class Node
end
end
obj = DoubleList.new
obj = DoublyLinkedList.new
obj.get(1)
obj.add_at_head(2)

View file

@ -10,7 +10,7 @@ end
# A Class for single linked lists (each element links to the next one, but not to the previous one)
class SingleList
class SinglyLinkedList
include Enumerable
attr_accessor :head
@ -75,7 +75,7 @@ class SingleList
end
end
obj = SingleList.new
obj = SinglyLinkedList.new
obj.insert_head(1)
obj.insert_head(2)