Skip to content

chore: fix some comments #5333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private ParenthesesGenerator() {
*/
public static List<String> generateParentheses(final int n) {
if (n < 0) {
throw new IllegalArgumentException("The number of pairs of parentheses cannot be nagative");
throw new IllegalArgumentException("The number of pairs of parentheses cannot be negative");
}
List<String> result = new ArrayList<>();
generateParenthesesHelper(result, "", 0, 0, n);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private Node insert(Node node, int data) {
}

/**
* Serach recursively if the given value is present in BST or not.
* Search recursively if the given value is present in BST or not.
*
* @param node the current node to check
* @param data the value to be checked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public final class PalindromePrime {
private PalindromePrime() {
}

public static void main(String[] args) { // Main funtion
public static void main(String[] args) { // Main function
Scanner in = new Scanner(System.in);
System.out.println("Enter the quantity of First Palindromic Primes you want");
int n = in.nextInt(); // Input of how many first palindromic prime we want
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from its initial sorted position.
Eg. For [2,5,6,8,11,12,15,18], 1 rotation gives [5,6,8,11,12,15,18,2], 2 rotations
[6,8,11,12,15,18,2,5] and so on. Finding the minimum element will take O(N) time but, we can use
Binary Search to find the mimimum element, we can reduce the complexity to O(log N). If we look
Binary Search to find the minimum element, we can reduce the complexity to O(log N). If we look
at the rotated array, to identify the minimum element (say a[i]), we observe that
a[i-1]>a[i]<a[i+1].

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/thealgorithms/maths/FFTTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void addFalseTest() {
assertNotEquals(2.0, add);
}

// Testing the function substract, assertEqual test
// Testing the function subtract, assertEqual test
@Test
void subtractTest() {
FFT.Complex complex1 = new FFT.Complex(2.0, 2.0);
Expand Down