(output *[]string, current string, opened, closed, max int)
| 14 | } |
| 15 | |
| 16 | func backTrack(output *[]string, current string, opened, closed, max int) { |
| 17 | if len(current) == max { |
| 18 | *output = append(*output, current) |
| 19 | } |
| 20 | if opened > 0 { |
| 21 | backTrack(output, current+"(", opened-1, closed, max) |
| 22 | |
| 23 | } |
| 24 | if closed > opened { |
| 25 | backTrack(output, current+")", opened, closed-1, max) |
| 26 | } |
| 27 | } |
no outgoing calls
no test coverage detected