mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
chore: fix some comments (#5333)
This commit is contained in:
@@ -19,7 +19,7 @@ public final class 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);
|
||||
|
||||
Reference in New Issue
Block a user