MCPcopy Create free account
hub / github.com/VanjaRo/LeetCode / generateParenthesis

Function generateParenthesis

tasks/22.go:9–14  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

7}
8
9func generateParenthesis(n int) []string {
10 var ret []string
11 backTrack(&ret, "", n, n, n*2)
12 return ret
13
14}
15
16func backTrack(output *[]string, current string, opened, closed, max int) {
17 if len(current) == max {

Callers 1

mainFunction · 0.85

Calls 1

backTrackFunction · 0.85

Tested by

no test coverage detected