From 64bc79b290d464055950b8b6f3a84ecc49b2e333 Mon Sep 17 00:00:00 2001 From: "anilkivilcim.eray" Date: Thu, 4 Apr 2019 15:50:39 +0300 Subject: [PATCH] BAEL-2797 wrong renaming fixed on algorithms package --- .../automata/FiniteStateMachine.java | 2 +- .../automata/RtFiniteStateMachine.java | 2 +- .../{math => algorithms}/automata/RtState.java | 2 +- .../{math => algorithms}/automata/RtTransition.java | 2 +- .../{math => algorithms}/automata/State.java | 2 +- .../{math => algorithms}/automata/Transition.java | 2 +- .../binarysearch/BinarySearch.java | 2 +- .../ApacheCommonsCombinationGenerator.java | 2 +- .../CombinatoricsLibCombinationGenerator.java | 2 +- .../combination/GuavaCombinationsGenerator.java | 2 +- .../combination/IterativeCombinationGenerator.java | 2 +- .../SelectionRecursiveCombinationGenerator.java | 2 +- .../SetRecursiveCombinationGenerator.java | 2 +- .../enumstatemachine/LeaveRequestState.java | 2 +- .../{math => algorithms}/factorial/Factorial.java | 2 +- .../hillclimbing/HillClimbing.java | 2 +- .../{math => algorithms}/hillclimbing/State.java | 2 +- .../kthlargest/FindKthLargest.java | 2 +- .../mcts/montecarlo/MonteCarloTreeSearch.java | 8 ++++---- .../{math => algorithms}/mcts/montecarlo/State.java | 6 +++--- .../{math => algorithms}/mcts/montecarlo/UCT.java | 4 ++-- .../{math => algorithms}/mcts/tictactoe/Board.java | 2 +- .../mcts/tictactoe/Position.java | 2 +- .../{math => algorithms}/mcts/tree/Node.java | 4 ++-- .../{math => algorithms}/mcts/tree/Tree.java | 2 +- .../middleelementlookup/MiddleElementLookup.java | 2 +- .../middleelementlookup/Node.java | 2 +- .../{math => algorithms}/minimax/GameOfBones.java | 2 +- .../{math => algorithms}/minimax/MiniMax.java | 2 +- .../baeldung/{math => algorithms}/minimax/Node.java | 2 +- .../baeldung/{math => algorithms}/minimax/Tree.java | 2 +- .../{math => algorithms}/multiswarm/Constants.java | 2 +- .../multiswarm/FitnessFunction.java | 2 +- .../{math => algorithms}/multiswarm/Multiswarm.java | 2 +- .../{math => algorithms}/multiswarm/Particle.java | 2 +- .../{math => algorithms}/multiswarm/Swarm.java | 2 +- .../permutation/Permutation.java | 2 +- .../string/EnglishAlphabetLetters.java | 2 +- .../LongestSubstringNonRepeatingCharacters.java | 2 +- .../string/SubstringPalindrome.java | 2 +- .../string/search/StringSearchAlgorithms.java | 2 +- .../twopointertechnique/LinkedListFindMiddle.java | 2 +- .../twopointertechnique/MyNode.java | 2 +- .../twopointertechnique/RotateArray.java | 2 +- .../twopointertechnique/TwoSum.java | 2 +- .../baeldung/math/HillClimbingAlgorithmUnitTest.java | 4 ++-- .../baeldung/math/MiddleElementLookupUnitTest.java | 4 ++-- .../RtFiniteStateMachineLongRunningUnitTest.java | 2 +- .../math/StringSearchAlgorithmsUnitTest.java | 2 +- .../math/binarysearch/BinarySearchUnitTest.java | 1 + .../math/combination/CombinationUnitTest.java | 3 +++ .../enumstatemachine/LeaveRequestStateUnitTest.java | 1 + .../baeldung/math/factorial/FactorialUnitTest.java | 1 + .../math/kthlargest/FindKthLargestUnitTest.java | 1 + .../java/com/baeldung/math/mcts/MCTSUnitTest.java | 12 ++++++------ .../com/baeldung/math/minimax/MinimaxUnitTest.java | 2 ++ .../baeldung/math/multiswarm/LolFitnessFunction.java | 2 ++ .../baeldung/math/multiswarm/MultiswarmUnitTest.java | 1 + .../math/string/EnglishAlphabetLettersUnitTest.java | 1 + ...ngestSubstringNonRepeatingCharactersUnitTest.java | 4 ++-- .../math/string/SubstringPalindromeUnitTest.java | 2 ++ .../LinkedListFindMiddleUnitTest.java | 2 ++ .../twopointertechnique/RotateArrayUnitTest.java | 1 + .../math/twopointertechnique/TwoSumUnitTest.java | 1 + 64 files changed, 85 insertions(+), 66 deletions(-) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/FiniteStateMachine.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/RtFiniteStateMachine.java (93%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/RtState.java (95%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/RtTransition.java (93%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/State.java (93%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/automata/Transition.java (89%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/binarysearch/BinarySearch.java (93%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/ApacheCommonsCombinationGenerator.java (94%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/CombinatoricsLibCombinationGenerator.java (86%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/GuavaCombinationsGenerator.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/IterativeCombinationGenerator.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/SelectionRecursiveCombinationGenerator.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/combination/SetRecursiveCombinationGenerator.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/enumstatemachine/LeaveRequestState.java (95%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/factorial/Factorial.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/hillclimbing/HillClimbing.java (99%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/hillclimbing/State.java (95%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/kthlargest/FindKthLargest.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/montecarlo/MonteCarloTreeSearch.java (94%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/montecarlo/State.java (93%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/montecarlo/UCT.java (87%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/tictactoe/Board.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/tictactoe/Position.java (88%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/tree/Node.java (94%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/mcts/tree/Tree.java (89%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/middleelementlookup/MiddleElementLookup.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/middleelementlookup/Node.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/minimax/GameOfBones.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/minimax/MiniMax.java (97%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/minimax/Node.java (94%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/minimax/Tree.java (81%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/multiswarm/Constants.java (96%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/multiswarm/FitnessFunction.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/multiswarm/Multiswarm.java (99%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/multiswarm/Particle.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/multiswarm/Swarm.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/permutation/Permutation.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/string/EnglishAlphabetLetters.java (96%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/string/LongestSubstringNonRepeatingCharacters.java (94%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/string/SubstringPalindrome.java (98%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/string/search/StringSearchAlgorithms.java (95%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/twopointertechnique/LinkedListFindMiddle.java (87%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/twopointertechnique/MyNode.java (84%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/twopointertechnique/RotateArray.java (90%) rename algorithms-miscellaneous-1/src/main/java/com/baeldung/{math => algorithms}/twopointertechnique/TwoSum.java (94%) diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/FiniteStateMachine.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/FiniteStateMachine.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/FiniteStateMachine.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/FiniteStateMachine.java index 704f5999f9..0cb11f5138 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/FiniteStateMachine.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/FiniteStateMachine.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; /** * Finite state machine. diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtFiniteStateMachine.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtFiniteStateMachine.java similarity index 93% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtFiniteStateMachine.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtFiniteStateMachine.java index 4fb233e9ff..1cf06c04b5 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtFiniteStateMachine.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtFiniteStateMachine.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; /** * Default implementation of a finite state machine. diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtState.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtState.java similarity index 95% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtState.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtState.java index c6f9f6a1a2..31cb9b577e 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtState.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtState.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; import java.util.ArrayList; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtTransition.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtTransition.java similarity index 93% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtTransition.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtTransition.java index e7c534df8b..cb205deacb 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/RtTransition.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/RtTransition.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; /** diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/State.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/State.java similarity index 93% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/State.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/State.java index 10a1d9d697..1889c4c7f6 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/State.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/State.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; /** * State. Part of a finite state machine. diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/Transition.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/Transition.java similarity index 89% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/Transition.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/Transition.java index 34d2b0b0bb..68177ba7dd 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/automata/Transition.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/automata/Transition.java @@ -1,4 +1,4 @@ -package com.baeldung.math.automata; +package com.baeldung.algorithms.automata; /** * Transition in a finite State machine. diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/binarysearch/BinarySearch.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/binarysearch/BinarySearch.java similarity index 93% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/binarysearch/BinarySearch.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/binarysearch/BinarySearch.java index 0a92153ec2..5b2ac49d4e 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/binarysearch/BinarySearch.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/binarysearch/BinarySearch.java @@ -1,4 +1,4 @@ -package com.baeldung.math.binarysearch; +package com.baeldung.algorithms.binarysearch; import java.util.Arrays; import java.util.Collections; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/ApacheCommonsCombinationGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/ApacheCommonsCombinationGenerator.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/ApacheCommonsCombinationGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/ApacheCommonsCombinationGenerator.java index c3806a46a2..40142ce940 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/ApacheCommonsCombinationGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/ApacheCommonsCombinationGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import java.util.Arrays; import java.util.Iterator; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/CombinatoricsLibCombinationGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/CombinatoricsLibCombinationGenerator.java similarity index 86% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/CombinatoricsLibCombinationGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/CombinatoricsLibCombinationGenerator.java index 5de6e11b93..0afdeefb8b 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/CombinatoricsLibCombinationGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/CombinatoricsLibCombinationGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import org.paukov.combinatorics3.Generator; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/GuavaCombinationsGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/GuavaCombinationsGenerator.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/GuavaCombinationsGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/GuavaCombinationsGenerator.java index 1865c5c38a..d2783881ba 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/GuavaCombinationsGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/GuavaCombinationsGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import java.util.Arrays; import java.util.Set; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/IterativeCombinationGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/IterativeCombinationGenerator.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/IterativeCombinationGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/IterativeCombinationGenerator.java index bb63aca213..676d2f41e3 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/IterativeCombinationGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/IterativeCombinationGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import java.util.ArrayList; import java.util.Arrays; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SelectionRecursiveCombinationGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SelectionRecursiveCombinationGenerator.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SelectionRecursiveCombinationGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SelectionRecursiveCombinationGenerator.java index 2be408c502..52305b8c2f 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SelectionRecursiveCombinationGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SelectionRecursiveCombinationGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import java.util.ArrayList; import java.util.Arrays; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SetRecursiveCombinationGenerator.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SetRecursiveCombinationGenerator.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SetRecursiveCombinationGenerator.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SetRecursiveCombinationGenerator.java index 5f15b0ac65..a73447b31d 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/combination/SetRecursiveCombinationGenerator.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/combination/SetRecursiveCombinationGenerator.java @@ -1,4 +1,4 @@ -package com.baeldung.math.combination; +package com.baeldung.algorithms.combination; import java.util.ArrayList; import java.util.Arrays; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/enumstatemachine/LeaveRequestState.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/enumstatemachine/LeaveRequestState.java similarity index 95% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/enumstatemachine/LeaveRequestState.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/enumstatemachine/LeaveRequestState.java index 77a626be82..5153c2e18e 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/enumstatemachine/LeaveRequestState.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/enumstatemachine/LeaveRequestState.java @@ -1,4 +1,4 @@ -package com.baeldung.math.enumstatemachine; +package com.baeldung.algorithms.enumstatemachine; public enum LeaveRequestState { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/factorial/Factorial.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/factorial/Factorial.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/factorial/Factorial.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/factorial/Factorial.java index 41cc08afd1..43d2221773 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/factorial/Factorial.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/factorial/Factorial.java @@ -1,4 +1,4 @@ -package com.baeldung.math.factorial; +package com.baeldung.algorithms.factorial; import java.math.BigInteger; import java.util.stream.LongStream; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/HillClimbing.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/HillClimbing.java similarity index 99% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/HillClimbing.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/HillClimbing.java index 39e2a99ae8..77089636c8 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/HillClimbing.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/HillClimbing.java @@ -1,4 +1,4 @@ -package com.baeldung.math.hillclimbing; +package com.baeldung.algorithms.hillclimbing; import java.util.ArrayList; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/State.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/State.java similarity index 95% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/State.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/State.java index cdf81b1460..9180b33b5b 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/hillclimbing/State.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/hillclimbing/State.java @@ -1,4 +1,4 @@ -package com.baeldung.math.hillclimbing; +package com.baeldung.algorithms.hillclimbing; import java.util.ArrayList; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/kthlargest/FindKthLargest.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/kthlargest/FindKthLargest.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/kthlargest/FindKthLargest.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/kthlargest/FindKthLargest.java index 4448e56f7d..7054979ada 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/kthlargest/FindKthLargest.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/kthlargest/FindKthLargest.java @@ -1,4 +1,4 @@ -package com.baeldung.math.kthlargest; +package com.baeldung.algorithms.kthlargest; import java.util.Arrays; import java.util.Collections; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/MonteCarloTreeSearch.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/MonteCarloTreeSearch.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java index e07ae99489..9835e5f534 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/MonteCarloTreeSearch.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java @@ -1,10 +1,10 @@ -package com.baeldung.math.mcts.montecarlo; +package com.baeldung.algorithms.mcts.montecarlo; import java.util.List; -import com.baeldung.math.mcts.tictactoe.Board; -import com.baeldung.math.mcts.tree.Node; -import com.baeldung.math.mcts.tree.Tree; +import com.baeldung.algorithms.mcts.tree.Node; +import com.baeldung.algorithms.mcts.tree.Tree; +import com.baeldung.algorithms.mcts.tictactoe.Board; public class MonteCarloTreeSearch { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/State.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/State.java similarity index 93% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/State.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/State.java index 44a44fdc94..5d4b265500 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/State.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/State.java @@ -1,10 +1,10 @@ -package com.baeldung.math.mcts.montecarlo; +package com.baeldung.algorithms.mcts.montecarlo; import java.util.ArrayList; import java.util.List; -import com.baeldung.math.mcts.tictactoe.Board; -import com.baeldung.math.mcts.tictactoe.Position; +import com.baeldung.algorithms.mcts.tictactoe.Board; +import com.baeldung.algorithms.mcts.tictactoe.Position; public class State { private Board board; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/UCT.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/UCT.java similarity index 87% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/UCT.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/UCT.java index adb447fa2b..b345bbec09 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/montecarlo/UCT.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/montecarlo/UCT.java @@ -1,9 +1,9 @@ -package com.baeldung.math.mcts.montecarlo; +package com.baeldung.algorithms.mcts.montecarlo; import java.util.Collections; import java.util.Comparator; -import com.baeldung.math.mcts.tree.Node; +import com.baeldung.algorithms.mcts.tree.Node; public class UCT { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Board.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Board.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Board.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Board.java index 3a1393b66f..1402c5e22d 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Board.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Board.java @@ -1,4 +1,4 @@ -package com.baeldung.math.mcts.tictactoe; +package com.baeldung.algorithms.mcts.tictactoe; import java.util.ArrayList; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Position.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Position.java similarity index 88% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Position.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Position.java index 6e39184ddf..94ead4288d 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tictactoe/Position.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tictactoe/Position.java @@ -1,4 +1,4 @@ -package com.baeldung.math.mcts.tictactoe; +package com.baeldung.algorithms.mcts.tictactoe; public class Position { int x; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Node.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Node.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Node.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Node.java index ff83e52c4e..0ad6510e50 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Node.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Node.java @@ -1,11 +1,11 @@ -package com.baeldung.math.mcts.tree; +package com.baeldung.algorithms.mcts.tree; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; -import com.baeldung.math.mcts.montecarlo.State; +import com.baeldung.algorithms.mcts.montecarlo.State; public class Node { State state; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Tree.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Tree.java similarity index 89% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Tree.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Tree.java index 3e91f22396..c5543c0ed4 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/mcts/tree/Tree.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/mcts/tree/Tree.java @@ -1,4 +1,4 @@ -package com.baeldung.math.mcts.tree; +package com.baeldung.algorithms.mcts.tree; public class Tree { Node root; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/MiddleElementLookup.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/MiddleElementLookup.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java index 4e847b1e11..7e25e0456b 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/MiddleElementLookup.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/MiddleElementLookup.java @@ -1,4 +1,4 @@ -package com.baeldung.math.middleelementlookup; +package com.baeldung.algorithms.middleelementlookup; import java.util.LinkedList; import java.util.Optional; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/Node.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/Node.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java index 987e8663ec..2a594937e3 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/middleelementlookup/Node.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/middleelementlookup/Node.java @@ -1,4 +1,4 @@ -package com.baeldung.math.middleelementlookup; +package com.baeldung.algorithms.middleelementlookup; public class Node { private Node next; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/GameOfBones.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/GameOfBones.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/GameOfBones.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/GameOfBones.java index 6f1ace9d54..8e14afcf7a 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/GameOfBones.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/GameOfBones.java @@ -1,4 +1,4 @@ -package com.baeldung.math.minimax; +package com.baeldung.algorithms.minimax; import java.util.List; import java.util.stream.Collectors; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/MiniMax.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/MiniMax.java similarity index 97% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/MiniMax.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/MiniMax.java index e656b133f3..fed4ebed48 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/MiniMax.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/MiniMax.java @@ -1,4 +1,4 @@ -package com.baeldung.math.minimax; +package com.baeldung.algorithms.minimax; import java.util.Comparator; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Node.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Node.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Node.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Node.java index ff41caee9f..4ceef0073d 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Node.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Node.java @@ -1,4 +1,4 @@ -package com.baeldung.math.minimax; +package com.baeldung.algorithms.minimax; import java.util.ArrayList; import java.util.List; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Tree.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Tree.java similarity index 81% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Tree.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Tree.java index 52716d244a..34c56cdd58 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/minimax/Tree.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/minimax/Tree.java @@ -1,4 +1,4 @@ -package com.baeldung.math.minimax; +package com.baeldung.algorithms.minimax; public class Tree { private Node root; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Constants.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Constants.java similarity index 96% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Constants.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Constants.java index 784ac56848..b646c686b2 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Constants.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Constants.java @@ -1,4 +1,4 @@ -package com.baeldung.math.multiswarm; +package com.baeldung.algorithms.multiswarm; /** * Constants used by the Multi-swarm optimization algorithms. diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/FitnessFunction.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/FitnessFunction.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/FitnessFunction.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/FitnessFunction.java index 289ae82352..2d86ec8d94 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/FitnessFunction.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/FitnessFunction.java @@ -1,4 +1,4 @@ -package com.baeldung.math.multiswarm; +package com.baeldung.algorithms.multiswarm; /** * Interface for a fitness function, used to decouple the main algorithm logic diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Multiswarm.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Multiswarm.java similarity index 99% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Multiswarm.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Multiswarm.java index f616c92dd5..ef60726278 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Multiswarm.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Multiswarm.java @@ -1,4 +1,4 @@ -package com.baeldung.math.multiswarm; +package com.baeldung.algorithms.multiswarm; import java.util.Arrays; import java.util.Random; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Particle.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Particle.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Particle.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Particle.java index df25b1a14f..5930a94267 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Particle.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Particle.java @@ -1,4 +1,4 @@ -package com.baeldung.math.multiswarm; +package com.baeldung.algorithms.multiswarm; import java.util.Arrays; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Swarm.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Swarm.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Swarm.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Swarm.java index efa98b2628..e6d37bb7e6 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/multiswarm/Swarm.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/multiswarm/Swarm.java @@ -1,4 +1,4 @@ -package com.baeldung.math.multiswarm; +package com.baeldung.algorithms.multiswarm; import java.util.Arrays; import java.util.Random; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/permutation/Permutation.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/permutation/Permutation.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/permutation/Permutation.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/permutation/Permutation.java index a574adc937..7fedd78ffb 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/permutation/Permutation.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/permutation/Permutation.java @@ -1,4 +1,4 @@ -package com.baeldung.math.permutation; +package com.baeldung.algorithms.permutation; import java.util.Arrays; import java.util.Collections; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/EnglishAlphabetLetters.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/EnglishAlphabetLetters.java similarity index 96% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/EnglishAlphabetLetters.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/EnglishAlphabetLetters.java index ea9181a633..2dd1fdcb75 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/EnglishAlphabetLetters.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/EnglishAlphabetLetters.java @@ -1,4 +1,4 @@ -package com.baeldung.math.string; +package com.baeldung.algorithms.string; public class EnglishAlphabetLetters { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharacters.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/LongestSubstringNonRepeatingCharacters.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharacters.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/LongestSubstringNonRepeatingCharacters.java index 527a5720bb..cd1f3e94d5 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharacters.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/LongestSubstringNonRepeatingCharacters.java @@ -1,4 +1,4 @@ -package com.baeldung.math.string; +package com.baeldung.algorithms.string; import java.util.HashMap; import java.util.HashSet; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/SubstringPalindrome.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/SubstringPalindrome.java similarity index 98% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/SubstringPalindrome.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/SubstringPalindrome.java index 9c490c70e9..b3d142eb07 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/SubstringPalindrome.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/SubstringPalindrome.java @@ -1,4 +1,4 @@ -package com.baeldung.math.string; +package com.baeldung.algorithms.string; import java.util.HashSet; import java.util.Set; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/search/StringSearchAlgorithms.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/search/StringSearchAlgorithms.java similarity index 95% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/search/StringSearchAlgorithms.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/search/StringSearchAlgorithms.java index d53817332c..45ac53e039 100755 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/string/search/StringSearchAlgorithms.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/string/search/StringSearchAlgorithms.java @@ -1,4 +1,4 @@ -package com.baeldung.math.string.search; +package com.baeldung.algorithms.string.search; import java.math.BigInteger; import java.util.Random; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddle.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/LinkedListFindMiddle.java similarity index 87% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddle.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/LinkedListFindMiddle.java index 39d612001d..a7031f4fba 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddle.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/LinkedListFindMiddle.java @@ -1,4 +1,4 @@ -package com.baeldung.math.twopointertechnique; +package com.baeldung.algorithms.twopointertechnique; public class LinkedListFindMiddle { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/MyNode.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/MyNode.java similarity index 84% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/MyNode.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/MyNode.java index 9fc227d7f1..7d93f03ef9 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/MyNode.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/MyNode.java @@ -1,4 +1,4 @@ -package com.baeldung.math.twopointertechnique; +package com.baeldung.algorithms.twopointertechnique; public class MyNode { MyNode next; diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/RotateArray.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/RotateArray.java similarity index 90% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/RotateArray.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/RotateArray.java index 6fddec6d7b..b4e3698c01 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/RotateArray.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/RotateArray.java @@ -1,4 +1,4 @@ -package com.baeldung.math.twopointertechnique; +package com.baeldung.algorithms.twopointertechnique; public class RotateArray { diff --git a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/TwoSum.java b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/TwoSum.java similarity index 94% rename from algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/TwoSum.java rename to algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/TwoSum.java index 46e6ba7439..14eceaa1bd 100644 --- a/algorithms-miscellaneous-1/src/main/java/com/baeldung/math/twopointertechnique/TwoSum.java +++ b/algorithms-miscellaneous-1/src/main/java/com/baeldung/algorithms/twopointertechnique/TwoSum.java @@ -1,4 +1,4 @@ -package com.baeldung.math.twopointertechnique; +package com.baeldung.algorithms.twopointertechnique; public class TwoSum { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/HillClimbingAlgorithmUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/HillClimbingAlgorithmUnitTest.java index c11a223b3e..15d8585157 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/HillClimbingAlgorithmUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/HillClimbingAlgorithmUnitTest.java @@ -1,7 +1,7 @@ package com.baeldung.math; -import com.baeldung.math.hillclimbing.HillClimbing; -import com.baeldung.math.hillclimbing.State; +import com.baeldung.algorithms.hillclimbing.HillClimbing; +import com.baeldung.algorithms.hillclimbing.State; import org.junit.Before; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/MiddleElementLookupUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/MiddleElementLookupUnitTest.java index e2ea92d9dd..97bbc6aeaa 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/MiddleElementLookupUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/MiddleElementLookupUnitTest.java @@ -1,7 +1,7 @@ package com.baeldung.math; -import com.baeldung.math.middleelementlookup.MiddleElementLookup; -import com.baeldung.math.middleelementlookup.Node; +import com.baeldung.algorithms.middleelementlookup.MiddleElementLookup; +import com.baeldung.algorithms.middleelementlookup.Node; import org.junit.Test; import java.util.LinkedList; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/RtFiniteStateMachineLongRunningUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/RtFiniteStateMachineLongRunningUnitTest.java index 637842717c..bee90459e2 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/RtFiniteStateMachineLongRunningUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/RtFiniteStateMachineLongRunningUnitTest.java @@ -1,6 +1,6 @@ package com.baeldung.math; -import com.baeldung.math.automata.*; +import com.baeldung.algorithms.automata.*; import org.junit.Test; import static org.junit.Assert.assertTrue; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/StringSearchAlgorithmsUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/StringSearchAlgorithmsUnitTest.java index bd69f0085d..9de282331a 100755 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/StringSearchAlgorithmsUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/StringSearchAlgorithmsUnitTest.java @@ -4,7 +4,7 @@ package com.baeldung.math; import org.junit.Assert; import org.junit.Test; -import com.baeldung.math.string.search.StringSearchAlgorithms; +import com.baeldung.algorithms.string.search.StringSearchAlgorithms; public class StringSearchAlgorithmsUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/binarysearch/BinarySearchUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/binarysearch/BinarySearchUnitTest.java index 61c6a838d8..15ecaa2d6a 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/binarysearch/BinarySearchUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/binarysearch/BinarySearchUnitTest.java @@ -3,6 +3,7 @@ package com.baeldung.math.binarysearch; import java.util.Arrays; import java.util.List; +import com.baeldung.algorithms.binarysearch.BinarySearch; import org.junit.Assert; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/combination/CombinationUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/combination/CombinationUnitTest.java index 54c57038a9..878a08c00f 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/combination/CombinationUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/combination/CombinationUnitTest.java @@ -4,6 +4,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; +import com.baeldung.algorithms.combination.IterativeCombinationGenerator; +import com.baeldung.algorithms.combination.SelectionRecursiveCombinationGenerator; +import com.baeldung.algorithms.combination.SetRecursiveCombinationGenerator; import org.junit.Test; public class CombinationUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/enumstatemachine/LeaveRequestStateUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/enumstatemachine/LeaveRequestStateUnitTest.java index 558ce0a0b2..feaf27c7c5 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/enumstatemachine/LeaveRequestStateUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/enumstatemachine/LeaveRequestStateUnitTest.java @@ -2,6 +2,7 @@ package com.baeldung.math.enumstatemachine; import static org.junit.Assert.assertEquals; +import com.baeldung.algorithms.enumstatemachine.LeaveRequestState; import org.junit.Test; public class LeaveRequestStateUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/factorial/FactorialUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/factorial/FactorialUnitTest.java index 654d45747a..22cd0a156c 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/factorial/FactorialUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/factorial/FactorialUnitTest.java @@ -4,6 +4,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.math.BigInteger; +import com.baeldung.algorithms.factorial.Factorial; import org.junit.Before; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/kthlargest/FindKthLargestUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/kthlargest/FindKthLargestUnitTest.java index 47d18fd02a..542b7e9c92 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/kthlargest/FindKthLargestUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/kthlargest/FindKthLargestUnitTest.java @@ -2,6 +2,7 @@ package com.baeldung.math.kthlargest; import static org.assertj.core.api.Assertions.*; +import com.baeldung.algorithms.kthlargest.FindKthLargest; import org.junit.Before; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/mcts/MCTSUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/mcts/MCTSUnitTest.java index 56c8b1fb5a..263233c876 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/mcts/MCTSUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/mcts/MCTSUnitTest.java @@ -8,12 +8,12 @@ import java.util.List; import org.junit.Before; import org.junit.Test; -import com.baeldung.math.mcts.montecarlo.MonteCarloTreeSearch; -import com.baeldung.math.mcts.montecarlo.State; -import com.baeldung.math.mcts.montecarlo.UCT; -import com.baeldung.math.mcts.tictactoe.Board; -import com.baeldung.math.mcts.tictactoe.Position; -import com.baeldung.math.mcts.tree.Tree; +import com.baeldung.algorithms.mcts.montecarlo.MonteCarloTreeSearch; +import com.baeldung.algorithms.mcts.montecarlo.State; +import com.baeldung.algorithms.mcts.montecarlo.UCT; +import com.baeldung.algorithms.mcts.tictactoe.Board; +import com.baeldung.algorithms.mcts.tictactoe.Position; +import com.baeldung.algorithms.mcts.tree.Tree; public class MCTSUnitTest { private Tree gameTree; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/minimax/MinimaxUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/minimax/MinimaxUnitTest.java index bcf03780c5..60b3e7fd6f 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/minimax/MinimaxUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/minimax/MinimaxUnitTest.java @@ -1,5 +1,7 @@ package com.baeldung.math.minimax; +import com.baeldung.algorithms.minimax.MiniMax; +import com.baeldung.algorithms.minimax.Tree; import org.junit.Before; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/LolFitnessFunction.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/LolFitnessFunction.java index b8c047a287..5ef8ecbb65 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/LolFitnessFunction.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/LolFitnessFunction.java @@ -1,5 +1,7 @@ package com.baeldung.math.multiswarm; +import com.baeldung.algorithms.multiswarm.FitnessFunction; + /** * Specific fitness function implementation to solve the League of Legends * problem. This is the problem statement:
diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/MultiswarmUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/MultiswarmUnitTest.java index 2c464a9bab..09b3c3d36e 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/MultiswarmUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/multiswarm/MultiswarmUnitTest.java @@ -1,5 +1,6 @@ package com.baeldung.math.multiswarm; +import com.baeldung.algorithms.multiswarm.Multiswarm; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/EnglishAlphabetLettersUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/EnglishAlphabetLettersUnitTest.java index c4d6263d2b..090a37bd45 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/EnglishAlphabetLettersUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/EnglishAlphabetLettersUnitTest.java @@ -1,5 +1,6 @@ package com.baeldung.math.string; +import com.baeldung.algorithms.string.EnglishAlphabetLetters; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharactersUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharactersUnitTest.java index ffce33dd4c..afb3f63d57 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharactersUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/LongestSubstringNonRepeatingCharactersUnitTest.java @@ -3,8 +3,8 @@ package com.baeldung.math.string; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; -import static com.baeldung.math.string.LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstring; -import static com.baeldung.math.string.LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstringBruteForce; +import static com.baeldung.algorithms.string.LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstring; +import static com.baeldung.algorithms.string.LongestSubstringNonRepeatingCharacters.getUniqueCharacterSubstringBruteForce; public class LongestSubstringNonRepeatingCharactersUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/SubstringPalindromeUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/SubstringPalindromeUnitTest.java index f8767c86f8..f7fad04b0d 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/SubstringPalindromeUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/string/SubstringPalindromeUnitTest.java @@ -3,6 +3,8 @@ package com.baeldung.math.string; import static org.junit.Assert.assertEquals; import java.util.HashSet; import java.util.Set; + +import com.baeldung.algorithms.string.SubstringPalindrome; import org.junit.Test; public class SubstringPalindromeUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddleUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddleUnitTest.java index 54077282c7..ec390a9b36 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddleUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/LinkedListFindMiddleUnitTest.java @@ -2,6 +2,8 @@ package com.baeldung.math.twopointertechnique; import static org.assertj.core.api.Assertions.assertThat; +import com.baeldung.algorithms.twopointertechnique.LinkedListFindMiddle; +import com.baeldung.algorithms.twopointertechnique.MyNode; import org.junit.Test; public class LinkedListFindMiddleUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/RotateArrayUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/RotateArrayUnitTest.java index 60b86dd213..2cf5b0fcb4 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/RotateArrayUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/RotateArrayUnitTest.java @@ -2,6 +2,7 @@ package com.baeldung.math.twopointertechnique; import static org.assertj.core.api.Assertions.assertThat; +import com.baeldung.algorithms.twopointertechnique.RotateArray; import org.junit.Test; public class RotateArrayUnitTest { diff --git a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/TwoSumUnitTest.java b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/TwoSumUnitTest.java index 3529e4a1ee..48983b22e8 100644 --- a/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/TwoSumUnitTest.java +++ b/algorithms-miscellaneous-1/src/test/java/com/baeldung/math/twopointertechnique/TwoSumUnitTest.java @@ -3,6 +3,7 @@ package com.baeldung.math.twopointertechnique; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.baeldung.algorithms.twopointertechnique.TwoSum; import org.junit.Test; public class TwoSumUnitTest {