From c99c8ffb04e1939e9ee30fd82993aaff74263f9a Mon Sep 17 00:00:00 2001 From: Vitor Oliveira Date: Sun, 7 Feb 2021 10:24:22 -0800 Subject: [PATCH] Rename files --- .../{circular_list.rb => circular_linked_list.rb} | 0 .../linked_lists/{double_list.rb => doubly_linked_list.rb} | 4 +--- .../linked_lists/{single_list.rb => singly_linked_list.rb} | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) rename data_structures/linked_lists/{circular_list.rb => circular_linked_list.rb} (100%) rename data_structures/linked_lists/{double_list.rb => doubly_linked_list.rb} (97%) rename data_structures/linked_lists/{single_list.rb => singly_linked_list.rb} (97%) diff --git a/data_structures/linked_lists/circular_list.rb b/data_structures/linked_lists/circular_linked_list.rb similarity index 100% rename from data_structures/linked_lists/circular_list.rb rename to data_structures/linked_lists/circular_linked_list.rb diff --git a/data_structures/linked_lists/double_list.rb b/data_structures/linked_lists/doubly_linked_list.rb similarity index 97% rename from data_structures/linked_lists/double_list.rb rename to data_structures/linked_lists/doubly_linked_list.rb index 85fb4eb..c87e876 100644 --- a/data_structures/linked_lists/double_list.rb +++ b/data_structures/linked_lists/doubly_linked_list.rb @@ -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 diff --git a/data_structures/linked_lists/single_list.rb b/data_structures/linked_lists/singly_linked_list.rb similarity index 97% rename from data_structures/linked_lists/single_list.rb rename to data_structures/linked_lists/singly_linked_list.rb index f54fd67..77b206e 100644 --- a/data_structures/linked_lists/single_list.rb +++ b/data_structures/linked_lists/singly_linked_list.rb @@ -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