chore: fix some comments (#5333)

This commit is contained in:
mountdisk
2024-08-17 01:19:15 +08:00
committed by GitHub
parent 98bee26d51
commit 7c58b190c8
5 changed files with 5 additions and 5 deletions

View File

@ -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);