mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 17:50:39 +08:00
Adding to backtracking (#1289)
* adding generate-parenthses algorithm * adding generateParenthses algorithm * adding generate parentheses algorithm * fixing comments according to the JDoc comments, cleaning code * fixing comments
This commit is contained in:
5
Backtracking/tests/GenerateParentheses.test.js
Normal file
5
Backtracking/tests/GenerateParentheses.test.js
Normal file
@ -0,0 +1,5 @@
|
||||
import { generateParentheses } from '../generateParentheses'
|
||||
|
||||
test('generate all valid parentheses of input 3', () => {
|
||||
expect(generateParentheses(3)).toStrictEqual(['((()))', '(()())', '(())()', '()(())', '()()()'])
|
||||
})
|
Reference in New Issue
Block a user