Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
9
func
generateParenthesis(n int) []string {
10
var
ret []string
11
backTrack(&ret,
""
, n, n, n*2)
12
return
ret
13
14
}
15
16
func
backTrack(output *[]string, current string, opened, closed, max int) {
17
if
len(current) == max {
Callers
1
main
Function · 0.85
Calls
1
backTrack
Function · 0.85
Tested by
no test coverage detected