Ad
  • Custom User Avatar

    how do you get to the amount of the combinations?
    for l=4 there are more than 4 combinations:
    (((xx)x)x)
    ((xx)(xx))
    ((x(xx))x)
    (x((xx)x))
    (x(x(xx)))

  • Custom User Avatar

    you can print the input the very same way you print your solution, to see which cases your code is failing

  • Custom User Avatar

    If you already returned something, your function is already "finished", so you will never get to the final (unconditional) return.