Repository: TheAlgorithms/Java
Pull request #6081 (2024-11-02 21:32:13)

refactor: rename `Recursion` package
rename package Recursion -> recursion package, remove duplicate class

<!--
Thank you for your contribution!
In order to reduce the number of notifications sent to the maintainers, please:
- create your PR as draft, cf. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests,
- make sure that all of the CI checks pass,
- mark your PR as ready for review, cf. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review
-->

<!-- For completed items, change [ ] to [x] -->

- [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Java/blob/master/CONTRIBUTING.md).
- [x] This pull request is all my own work -- I have not plagiarized it.
- [x] All filenames are in PascalCase.
- [x] All functions and variable names follow Java naming conventions.
- [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
- [x] All new code is formatted with `clang-format -i --style=file path/to/your/file.java`

codecov-commenter: ## [Codecov](https://app.codecov.io/gh/TheAlgorithms/Java/pull/6081?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TheAlgorithms) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 73.50%. Comparing base [(`539871a`)](https://app.codecov.io/gh/TheAlgorithms/Java/commit/539871a33e2a407a1fb3ebdb12d6a15bb18374be?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TheAlgorithms) to head [(`231b5af`)](https://app.codecov.io/gh/TheAlgorithms/Java/commit/231b5affd2cbb0592fca7b1b30dca428f0087fa1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TheAlgorithms).

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff              @@
##             master    #6081      +/-   ##
============================================
+ Coverage     73.46%   73.50%   +0.04%     
+ Complexity     5099     5098       -1     
============================================
  Files           658      657       -1     
  Lines         17637    17625      -12     
  Branches       3394     3393       -1     
============================================
- Hits          12957    12956       -1     
+ Misses         4178     4166      -12     
- Partials        502      503       +1     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/TheAlgorithms/Java/pull/6081?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TheAlgorithms).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TheAlgorithms).


Patch:
diff --git a/src/main/java/com/thealgorithms/others/FibbonaciSeries.java b/src/main/java/com/thealgorithms/others/FibbonaciSeries.java
deleted file mode 100644
index a4815296..00000000
--- a/src/main/java/com/thealgorithms/others/FibbonaciSeries.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.thealgorithms.others;
-
-import java.util.Scanner;
-
-/**
- * Fibonacci sequence, and characterized by the fact that every number after the
- * first two is the sum of the two preceding ones.
- *
- * <p>
- * Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,...
- *
- * <p>
- * Source for the explanation: https://en.wikipedia.org/wiki/Fibonacci_number
- *
- * Problem Statement: print all Fibonacci numbers that are smaller than your
- * given input N
- */
-public final class FibbonaciSeries {
-    private FibbonaciSeries() {
-    }
-
-    public static void main(String[] args) {
-        // Get input from the user
-        Scanner scan = new Scanner(System.in);
-        int n = scan.nextInt();
-        int first = 0;
-        int second = 1;
-        scan.close();
-        while (first <= n) {
-            // print first fibo 0 then add second fibo into it while updating second as well
-            System.out.println(first);
-            int next = first + second;
-            first = second;
-            second = next;
-        }
-    }
-}
diff --git a/src/main/java/com/thealgorithms/Recursion/FibonacciSeries.java b/src/main/java/com/thealgorithms/recursion/FibonacciSeries.java
similarity index 93%
rename from src/main/java/com/thealgorithms/Recursion/FibonacciSeries.java
rename to src/main/java/com/thealgorithms/recursion/FibonacciSeries.java
index a89d110b..e5f47408 100644
--- a/src/main/java/com/thealgorithms/Recursion/FibonacciSeries.java
+++ b/src/main/java/com/thealgorithms/recursion/FibonacciSeries.java
@@ -1,4 +1,4 @@
-package com.thealgorithms.Recursion;
+package com.thealgorithms.recursion;
 
 /*
     The Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones,
diff --git a/src/main/java/com/thealgorithms/Recursion/GenerateSubsets.java b/src/main/java/com/thealgorithms/recursion/GenerateSubsets.java
similarity index 96%
rename from src/main/java/com/thealgorithms/Recursion/GenerateSubsets.java
rename to src/main/java/com/thealgorithms/recursion/GenerateSubsets.java
index 417bf130..5a3ff2e8 100644
--- a/src/main/java/com/thealgorithms/Recursion/GenerateSubsets.java
+++ b/src/main/java/com/thealgorithms/recursion/GenerateSubsets.java
@@ -1,4 +1,4 @@
-package com.thealgorithms.Recursion;
+package com.thealgorithms.recursion;
 
 // program to find power set of a string
 


Test patch:
diff --git a/src/test/java/com/thealgorithms/Recursion/FibonacciSeriesTest.java b/src/test/java/com/thealgorithms/recursion/FibonacciSeriesTest.java
similarity index 96%
rename from src/test/java/com/thealgorithms/Recursion/FibonacciSeriesTest.java
rename to src/test/java/com/thealgorithms/recursion/FibonacciSeriesTest.java
index 4e4fc458..f8b59f7e 100644
--- a/src/test/java/com/thealgorithms/Recursion/FibonacciSeriesTest.java
+++ b/src/test/java/com/thealgorithms/recursion/FibonacciSeriesTest.java
@@ -1,4 +1,4 @@
-package com.thealgorithms.Recursion;
+package com.thealgorithms.recursion;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
diff --git a/src/test/java/com/thealgorithms/Recursion/GenerateSubsetsTest.java b/src/test/java/com/thealgorithms/recursion/GenerateSubsetsTest.java
similarity index 96%
rename from src/test/java/com/thealgorithms/Recursion/GenerateSubsetsTest.java
rename to src/test/java/com/thealgorithms/recursion/GenerateSubsetsTest.java
index d4bc7e48..b92d1406 100644
--- a/src/test/java/com/thealgorithms/Recursion/GenerateSubsetsTest.java
+++ b/src/test/java/com/thealgorithms/recursion/GenerateSubsetsTest.java
@@ -1,4 +1,4 @@
-package com.thealgorithms.Recursion;
+package com.thealgorithms.recursion;
 
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;