diff --git a/core-java/src/main/java/com/baeldung/linkedlist/MiddleElementLookup.java b/algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java similarity index 97% rename from core-java/src/main/java/com/baeldung/linkedlist/MiddleElementLookup.java rename to algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java index 4cfa0d411b..7e25e0456b 100644 --- a/core-java/src/main/java/com/baeldung/linkedlist/MiddleElementLookup.java +++ b/algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java @@ -1,10 +1,8 @@ -package com.baeldung.linkedlist; +package com.baeldung.algorithms.middleelementlookup; import java.util.LinkedList; import java.util.Optional; -import com.baeldung.linkedlist.Node; - public class MiddleElementLookup { public static Optional findMiddleElementLinkedList(LinkedList linkedList) { diff --git a/core-java/src/main/java/com/baeldung/linkedlist/Node.java b/algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java similarity index 90% rename from core-java/src/main/java/com/baeldung/linkedlist/Node.java rename to algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java index daceaffdcd..2a594937e3 100644 --- a/core-java/src/main/java/com/baeldung/linkedlist/Node.java +++ b/algorithms/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java @@ -1,4 +1,4 @@ -package com.baeldung.linkedlist; +package com.baeldung.algorithms.middleelementlookup; public class Node { private Node next; diff --git a/core-java/src/test/java/com/baeldung/linkedlist/MiddleElementLookupUnitTest.java b/algorithms/src/test/java/algorithms/MiddleElementLookupUnitTest.java similarity index 95% rename from core-java/src/test/java/com/baeldung/linkedlist/MiddleElementLookupUnitTest.java rename to algorithms/src/test/java/algorithms/MiddleElementLookupUnitTest.java index 2801bbfc9e..01f9ca2f76 100644 --- a/core-java/src/test/java/com/baeldung/linkedlist/MiddleElementLookupUnitTest.java +++ b/algorithms/src/test/java/algorithms/MiddleElementLookupUnitTest.java @@ -1,11 +1,13 @@ -package com.baeldung.linkedlist; +package algorithms; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import com.baeldung.algorithms.middleelementlookup.MiddleElementLookup; +import com.baeldung.algorithms.middleelementlookup.Node; +import org.junit.Test; import java.util.LinkedList; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; public class MiddleElementLookupUnitTest {