mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-01-17 06:11:43 +01:00
Rename files
This commit is contained in:
parent
0624af6cb9
commit
c99c8ffb04
3 changed files with 2 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
class DoublyLinkedList
|
||||
# Initialize your data structure here.
|
||||
# Initialize the data structure here.
|
||||
attr_reader :head, :tail, :size
|
||||
|
||||
def initialize
|
||||
|
@ -84,7 +84,6 @@ class DoublyLinkedList
|
|||
cnt -= 1
|
||||
end
|
||||
end
|
||||
# else put "illegal input"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +125,6 @@ class DoublyLinkedList
|
|||
cnt -= 1
|
||||
end
|
||||
end
|
||||
# else put "illegal input"
|
||||
end
|
||||
end
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
# Define a node in the list
|
||||
class Node
|
||||
# Initialize the data structure here.
|
||||
attr_accessor :value, :next
|
||||
|
||||
def initialize(value)
|
||||
|
@ -9,7 +10,6 @@ class Node
|
|||
end
|
||||
|
||||
# A Class for single linked lists (each element links to the next one, but not to the previous one)
|
||||
|
||||
class SinglyLinkedList
|
||||
include Enumerable
|
||||
attr_accessor :head
|
Loading…
Reference in a new issue