From 0624af6cb903ddc083b2c0c0952bfb5bd19c81cc Mon Sep 17 00:00:00 2001 From: Vitor Oliveira Date: Sun, 7 Feb 2021 10:17:53 -0800 Subject: [PATCH] Rename class names --- data_structures/linked_lists/double_list.rb | 4 ++-- data_structures/linked_lists/single_list.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data_structures/linked_lists/double_list.rb b/data_structures/linked_lists/double_list.rb index bc9278a..85fb4eb 100644 --- a/data_structures/linked_lists/double_list.rb +++ b/data_structures/linked_lists/double_list.rb @@ -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) diff --git a/data_structures/linked_lists/single_list.rb b/data_structures/linked_lists/single_list.rb index a4f84e6..f54fd67 100644 --- a/data_structures/linked_lists/single_list.rb +++ b/data_structures/linked_lists/single_list.rb @@ -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)