Skip to content

Commit 7c58b19

Browse files
authored
chore: fix some comments (#5333)
1 parent 98bee26 commit 7c58b19

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/main/java/com/thealgorithms/backtracking/ParenthesesGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private ParenthesesGenerator() {
1919
*/
2020
public static List<String> generateParentheses(final int n) {
2121
if (n < 0) {
22-
throw new IllegalArgumentException("The number of pairs of parentheses cannot be nagative");
22+
throw new IllegalArgumentException("The number of pairs of parentheses cannot be negative");
2323
}
2424
List<String> result = new ArrayList<>();
2525
generateParenthesesHelper(result, "", 0, 0, n);

src/main/java/com/thealgorithms/datastructures/trees/BSTRecursive.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private Node insert(Node node, int data) {
9595
}
9696

9797
/**
98-
* Serach recursively if the given value is present in BST or not.
98+
* Search recursively if the given value is present in BST or not.
9999
*
100100
* @param node the current node to check
101101
* @param data the value to be checked

src/main/java/com/thealgorithms/misc/PalindromePrime.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public final class PalindromePrime {
66
private PalindromePrime() {
77
}
88

9-
public static void main(String[] args) { // Main funtion
9+
public static void main(String[] args) { // Main function
1010
Scanner in = new Scanner(System.in);
1111
System.out.println("Enter the quantity of First Palindromic Primes you want");
1212
int n = in.nextInt(); // Input of how many first palindromic prime we want

src/main/java/com/thealgorithms/searches/HowManyTimesRotated.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from its initial sorted position.
1818
Eg. For [2,5,6,8,11,12,15,18], 1 rotation gives [5,6,8,11,12,15,18,2], 2 rotations
1919
[6,8,11,12,15,18,2,5] and so on. Finding the minimum element will take O(N) time but, we can use
20-
Binary Search to find the mimimum element, we can reduce the complexity to O(log N). If we look
20+
Binary Search to find the minimum element, we can reduce the complexity to O(log N). If we look
2121
at the rotated array, to identify the minimum element (say a[i]), we observe that
2222
a[i-1]>a[i]<a[i+1].
2323

src/test/java/com/thealgorithms/maths/FFTTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void addFalseTest() {
4040
assertNotEquals(2.0, add);
4141
}
4242

43-
// Testing the function substract, assertEqual test
43+
// Testing the function subtract, assertEqual test
4444
@Test
4545
void subtractTest() {
4646
FFT.Complex complex1 = new FFT.Complex(2.0, 2.0);

0 commit comments

Comments
 (0)