From 59c30dada8cd705a787683c6a1af725f8d5df470 Mon Sep 17 00:00:00 2001 From: GauravWalia19 Date: Fri, 28 Dec 2018 23:56:15 +0530 Subject: [PATCH] updated list hrierachy in java --- .../Circular-Using-Object}/.gitignore | 0 .../Circular-Using-Object}/Main.java | 0 .../Circular-Using-Object}/circularlist.java | 0 .../Circular-Using-Object}/data.java | 0 .../Circular-Using-Object}/node.java | 0 .../LISTS/CIRCULAR/{ => STANDARD}/CLLNode.java | 0 .../{ => STANDARD}/CircularLinkedList.java | 0 .../LISTS/CIRCULAR/{ => STANDARD}/Main.java | 0 .../LISTS/{ => CIRCULAR}/circular/CLLNode.java | 0 .../circular/CircularLinkedList.java | 0 .../LISTS/{ => CIRCULAR}/circular/Main.java | 0 .../Double-Using-Object}/DoubleLinkedList.java | 0 .../Double-Using-Object}/Main.java | 0 .../Double-Using-Object}/Node.java | 0 .../Double-Using-Object}/data.java | 0 .../LISTS/DOUBLE/{ => STANDARD}/DLLNode.java | 0 .../DOUBLE/{ => STANDARD}/DoublyLinkedList.java | 0 .../LISTS/DOUBLE/{ => STANDARD}/Main.java | 0 .../LISTS/Double-Linked-List/.gitignore | 3 --- .../LISTS/{ => INBUILT}/arrayList.java | 0 .../LISTS/{ => INBUILT}/vectors.java | 0 .../LISTS/{ => SINGLE}/HYBRID-SINGLE/Main.java | 0 .../LISTS/{ => SINGLE}/HYBRID-SINGLE/Node.java | 0 .../HYBRID-SINGLE/SingleLinkedList.java | 0 .../LISTS/SINGLE/{ => STANDARD}/LinkedList.java | 0 .../LISTS/SINGLE/{ => STANDARD}/ListNode.java | 0 .../LISTS/SINGLE/{ => STANDARD}/Main.java | 0 .../Single-Using-Object}/.gitignore | 0 .../Single-Using-Object}/Main.java | 0 .../Single-Using-Object}/node.java | 0 .../Single-Using-Object}/sample.java | 0 .../Single-Using-Object}/singleLinkedList.java | 5 ----- Java/README.md | 15 ++++++++------- 33 files changed, 8 insertions(+), 15 deletions(-) rename Java/Data-Structures/LISTS/{Circular-Single-Linked-List => CIRCULAR/Circular-Using-Object}/.gitignore (100%) rename Java/Data-Structures/LISTS/{Circular-Single-Linked-List => CIRCULAR/Circular-Using-Object}/Main.java (100%) rename Java/Data-Structures/LISTS/{Circular-Single-Linked-List => CIRCULAR/Circular-Using-Object}/circularlist.java (100%) rename Java/Data-Structures/LISTS/{Circular-Single-Linked-List => CIRCULAR/Circular-Using-Object}/data.java (100%) rename Java/Data-Structures/LISTS/{Circular-Single-Linked-List => CIRCULAR/Circular-Using-Object}/node.java (100%) rename Java/Data-Structures/LISTS/CIRCULAR/{ => STANDARD}/CLLNode.java (100%) rename Java/Data-Structures/LISTS/CIRCULAR/{ => STANDARD}/CircularLinkedList.java (100%) rename Java/Data-Structures/LISTS/CIRCULAR/{ => STANDARD}/Main.java (100%) rename Java/Data-Structures/LISTS/{ => CIRCULAR}/circular/CLLNode.java (100%) rename Java/Data-Structures/LISTS/{ => CIRCULAR}/circular/CircularLinkedList.java (100%) rename Java/Data-Structures/LISTS/{ => CIRCULAR}/circular/Main.java (100%) rename Java/Data-Structures/LISTS/{Double-Linked-List => DOUBLE/Double-Using-Object}/DoubleLinkedList.java (100%) rename Java/Data-Structures/LISTS/{Double-Linked-List => DOUBLE/Double-Using-Object}/Main.java (100%) rename Java/Data-Structures/LISTS/{Double-Linked-List => DOUBLE/Double-Using-Object}/Node.java (100%) rename Java/Data-Structures/LISTS/{Double-Linked-List => DOUBLE/Double-Using-Object}/data.java (100%) rename Java/Data-Structures/LISTS/DOUBLE/{ => STANDARD}/DLLNode.java (100%) rename Java/Data-Structures/LISTS/DOUBLE/{ => STANDARD}/DoublyLinkedList.java (100%) rename Java/Data-Structures/LISTS/DOUBLE/{ => STANDARD}/Main.java (100%) delete mode 100644 Java/Data-Structures/LISTS/Double-Linked-List/.gitignore rename Java/Data-Structures/LISTS/{ => INBUILT}/arrayList.java (100%) rename Java/Data-Structures/LISTS/{ => INBUILT}/vectors.java (100%) rename Java/Data-Structures/LISTS/{ => SINGLE}/HYBRID-SINGLE/Main.java (100%) rename Java/Data-Structures/LISTS/{ => SINGLE}/HYBRID-SINGLE/Node.java (100%) rename Java/Data-Structures/LISTS/{ => SINGLE}/HYBRID-SINGLE/SingleLinkedList.java (100%) rename Java/Data-Structures/LISTS/SINGLE/{ => STANDARD}/LinkedList.java (100%) rename Java/Data-Structures/LISTS/SINGLE/{ => STANDARD}/ListNode.java (100%) rename Java/Data-Structures/LISTS/SINGLE/{ => STANDARD}/Main.java (100%) rename Java/Data-Structures/LISTS/{Single-Linked-List => SINGLE/Single-Using-Object}/.gitignore (100%) rename Java/Data-Structures/LISTS/{Single-Linked-List => SINGLE/Single-Using-Object}/Main.java (100%) rename Java/Data-Structures/LISTS/{Single-Linked-List => SINGLE/Single-Using-Object}/node.java (100%) rename Java/Data-Structures/LISTS/{Single-Linked-List => SINGLE/Single-Using-Object}/sample.java (100%) rename Java/Data-Structures/LISTS/{Single-Linked-List => SINGLE/Single-Using-Object}/singleLinkedList.java (96%) diff --git a/Java/Data-Structures/LISTS/Circular-Single-Linked-List/.gitignore b/Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/.gitignore similarity index 100% rename from Java/Data-Structures/LISTS/Circular-Single-Linked-List/.gitignore rename to Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/.gitignore diff --git a/Java/Data-Structures/LISTS/Circular-Single-Linked-List/Main.java b/Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/Circular-Single-Linked-List/Main.java rename to Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/Main.java diff --git a/Java/Data-Structures/LISTS/Circular-Single-Linked-List/circularlist.java b/Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/circularlist.java similarity index 100% rename from Java/Data-Structures/LISTS/Circular-Single-Linked-List/circularlist.java rename to Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/circularlist.java diff --git a/Java/Data-Structures/LISTS/Circular-Single-Linked-List/data.java b/Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/data.java similarity index 100% rename from Java/Data-Structures/LISTS/Circular-Single-Linked-List/data.java rename to Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/data.java diff --git a/Java/Data-Structures/LISTS/Circular-Single-Linked-List/node.java b/Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/node.java similarity index 100% rename from Java/Data-Structures/LISTS/Circular-Single-Linked-List/node.java rename to Java/Data-Structures/LISTS/CIRCULAR/Circular-Using-Object/node.java diff --git a/Java/Data-Structures/LISTS/CIRCULAR/CLLNode.java b/Java/Data-Structures/LISTS/CIRCULAR/STANDARD/CLLNode.java similarity index 100% rename from Java/Data-Structures/LISTS/CIRCULAR/CLLNode.java rename to Java/Data-Structures/LISTS/CIRCULAR/STANDARD/CLLNode.java diff --git a/Java/Data-Structures/LISTS/CIRCULAR/CircularLinkedList.java b/Java/Data-Structures/LISTS/CIRCULAR/STANDARD/CircularLinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/CIRCULAR/CircularLinkedList.java rename to Java/Data-Structures/LISTS/CIRCULAR/STANDARD/CircularLinkedList.java diff --git a/Java/Data-Structures/LISTS/CIRCULAR/Main.java b/Java/Data-Structures/LISTS/CIRCULAR/STANDARD/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/CIRCULAR/Main.java rename to Java/Data-Structures/LISTS/CIRCULAR/STANDARD/Main.java diff --git a/Java/Data-Structures/LISTS/circular/CLLNode.java b/Java/Data-Structures/LISTS/CIRCULAR/circular/CLLNode.java similarity index 100% rename from Java/Data-Structures/LISTS/circular/CLLNode.java rename to Java/Data-Structures/LISTS/CIRCULAR/circular/CLLNode.java diff --git a/Java/Data-Structures/LISTS/circular/CircularLinkedList.java b/Java/Data-Structures/LISTS/CIRCULAR/circular/CircularLinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/circular/CircularLinkedList.java rename to Java/Data-Structures/LISTS/CIRCULAR/circular/CircularLinkedList.java diff --git a/Java/Data-Structures/LISTS/circular/Main.java b/Java/Data-Structures/LISTS/CIRCULAR/circular/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/circular/Main.java rename to Java/Data-Structures/LISTS/CIRCULAR/circular/Main.java diff --git a/Java/Data-Structures/LISTS/Double-Linked-List/DoubleLinkedList.java b/Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/DoubleLinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/Double-Linked-List/DoubleLinkedList.java rename to Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/DoubleLinkedList.java diff --git a/Java/Data-Structures/LISTS/Double-Linked-List/Main.java b/Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/Double-Linked-List/Main.java rename to Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/Main.java diff --git a/Java/Data-Structures/LISTS/Double-Linked-List/Node.java b/Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/Node.java similarity index 100% rename from Java/Data-Structures/LISTS/Double-Linked-List/Node.java rename to Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/Node.java diff --git a/Java/Data-Structures/LISTS/Double-Linked-List/data.java b/Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/data.java similarity index 100% rename from Java/Data-Structures/LISTS/Double-Linked-List/data.java rename to Java/Data-Structures/LISTS/DOUBLE/Double-Using-Object/data.java diff --git a/Java/Data-Structures/LISTS/DOUBLE/DLLNode.java b/Java/Data-Structures/LISTS/DOUBLE/STANDARD/DLLNode.java similarity index 100% rename from Java/Data-Structures/LISTS/DOUBLE/DLLNode.java rename to Java/Data-Structures/LISTS/DOUBLE/STANDARD/DLLNode.java diff --git a/Java/Data-Structures/LISTS/DOUBLE/DoublyLinkedList.java b/Java/Data-Structures/LISTS/DOUBLE/STANDARD/DoublyLinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/DOUBLE/DoublyLinkedList.java rename to Java/Data-Structures/LISTS/DOUBLE/STANDARD/DoublyLinkedList.java diff --git a/Java/Data-Structures/LISTS/DOUBLE/Main.java b/Java/Data-Structures/LISTS/DOUBLE/STANDARD/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/DOUBLE/Main.java rename to Java/Data-Structures/LISTS/DOUBLE/STANDARD/Main.java diff --git a/Java/Data-Structures/LISTS/Double-Linked-List/.gitignore b/Java/Data-Structures/LISTS/Double-Linked-List/.gitignore deleted file mode 100644 index a36457f..0000000 --- a/Java/Data-Structures/LISTS/Double-Linked-List/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Ignore files for java - -*.class \ No newline at end of file diff --git a/Java/Data-Structures/LISTS/arrayList.java b/Java/Data-Structures/LISTS/INBUILT/arrayList.java similarity index 100% rename from Java/Data-Structures/LISTS/arrayList.java rename to Java/Data-Structures/LISTS/INBUILT/arrayList.java diff --git a/Java/Data-Structures/LISTS/vectors.java b/Java/Data-Structures/LISTS/INBUILT/vectors.java similarity index 100% rename from Java/Data-Structures/LISTS/vectors.java rename to Java/Data-Structures/LISTS/INBUILT/vectors.java diff --git a/Java/Data-Structures/LISTS/HYBRID-SINGLE/Main.java b/Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/HYBRID-SINGLE/Main.java rename to Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/Main.java diff --git a/Java/Data-Structures/LISTS/HYBRID-SINGLE/Node.java b/Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/Node.java similarity index 100% rename from Java/Data-Structures/LISTS/HYBRID-SINGLE/Node.java rename to Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/Node.java diff --git a/Java/Data-Structures/LISTS/HYBRID-SINGLE/SingleLinkedList.java b/Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/SingleLinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/HYBRID-SINGLE/SingleLinkedList.java rename to Java/Data-Structures/LISTS/SINGLE/HYBRID-SINGLE/SingleLinkedList.java diff --git a/Java/Data-Structures/LISTS/SINGLE/LinkedList.java b/Java/Data-Structures/LISTS/SINGLE/STANDARD/LinkedList.java similarity index 100% rename from Java/Data-Structures/LISTS/SINGLE/LinkedList.java rename to Java/Data-Structures/LISTS/SINGLE/STANDARD/LinkedList.java diff --git a/Java/Data-Structures/LISTS/SINGLE/ListNode.java b/Java/Data-Structures/LISTS/SINGLE/STANDARD/ListNode.java similarity index 100% rename from Java/Data-Structures/LISTS/SINGLE/ListNode.java rename to Java/Data-Structures/LISTS/SINGLE/STANDARD/ListNode.java diff --git a/Java/Data-Structures/LISTS/SINGLE/Main.java b/Java/Data-Structures/LISTS/SINGLE/STANDARD/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/SINGLE/Main.java rename to Java/Data-Structures/LISTS/SINGLE/STANDARD/Main.java diff --git a/Java/Data-Structures/LISTS/Single-Linked-List/.gitignore b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/.gitignore similarity index 100% rename from Java/Data-Structures/LISTS/Single-Linked-List/.gitignore rename to Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/.gitignore diff --git a/Java/Data-Structures/LISTS/Single-Linked-List/Main.java b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/Main.java similarity index 100% rename from Java/Data-Structures/LISTS/Single-Linked-List/Main.java rename to Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/Main.java diff --git a/Java/Data-Structures/LISTS/Single-Linked-List/node.java b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/node.java similarity index 100% rename from Java/Data-Structures/LISTS/Single-Linked-List/node.java rename to Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/node.java diff --git a/Java/Data-Structures/LISTS/Single-Linked-List/sample.java b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/sample.java similarity index 100% rename from Java/Data-Structures/LISTS/Single-Linked-List/sample.java rename to Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/sample.java diff --git a/Java/Data-Structures/LISTS/Single-Linked-List/singleLinkedList.java b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/singleLinkedList.java similarity index 96% rename from Java/Data-Structures/LISTS/Single-Linked-List/singleLinkedList.java rename to Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/singleLinkedList.java index aea26b5..e519e37 100644 --- a/Java/Data-Structures/LISTS/Single-Linked-List/singleLinkedList.java +++ b/Java/Data-Structures/LISTS/SINGLE/Single-Using-Object/singleLinkedList.java @@ -111,11 +111,6 @@ else if(obj.equals(current.getSample())) } return current; } - //removing duplicates - // public void removeDuplicates() - // { - // node current = head; - // } //method for searching in the list public boolean search(sample obj) { diff --git a/Java/README.md b/Java/README.md index 2df6223..c846474 100644 --- a/Java/README.md +++ b/Java/README.md @@ -24,21 +24,22 @@ #### LISTS * SINGLE - * [Single Linked List](Data-Structures/LISTS/SINGLE/LinkedList.java) - * [Single Linked List using object data](Data-Structures/LISTS/Single-Linked-List/singleLinkedList.java) + * [Single Linked List](Data-Structures/LISTS/SINGLE/STANDARD/LinkedList.java) + * [Single Linked List using object data](Data-Structures/LISTS/SINGLE/Single-Using-Object/singleLinkedList.java) * DOUBLE - * [Double Linked List](Data-Structures/LISTS/DOUBLE/DoublyLinkedList.java) - * [Double Linked List using object data](Data-Structures/LISTS/Double-Linked-List/DoubleLinkedList.java) + * [Double Linked List](Data-Structures/LISTS/DOUBLE/STANDARD/DoublyLinkedList.java) + * [Double Linked List using object data](Data-Structures/LISTS/DOUBLE/Double-Using-Object/DoubleLinkedList.java) * CIRCULAR - * [Circular Linked List (using tail node)](Data-Structures/LISTS/CIRCULAR/CircularLinkedList.java) + * [Circular Linked List (using tail node)](Data-Structures/LISTS/CIRCULAR/STANDARD/CircularLinkedList.java) * MEMORY EFFICIENT DOUBLE LINKED LIST * UNROLLED LINKED LIST * SKIP LIST * INBUILT LISTS * [LINKED LIST] - * [ARRAYLIST](Data-Structures/LISTS/arrayList.java) - * [VECTORS](Data-Structures/LISTS/vectors.java) + * [ARRAYLIST](Data-Structures/LISTS/INBUILT/arrayList.java) + * [VECTORS](Data-Structures/LISTS/INBUILT/vectors.java) * MISC + * Find the nth node from the end #### STACKS