mirror of
https://github.com/TheAlgorithms/Ruby
synced 2024-12-27 21:58:57 +01:00
Rename class names
This commit is contained in:
parent
a4b8e1eb15
commit
0624af6cb9
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue