Does the order matter?Rejected even when I got all of them correct

  • 1

    I got rejected because:

    Input:	4
    Output: 	["()()()()","(()()())","()(()())","((()()))","(()())()","()()(())","(()(()))","()(())()","()((()))","(((())))","((()))()","()(())()","((())())","(())()()"]
    Expected:   ["(((())))","((()()))","((())())","((()))()","(()(()))","(()()())","(()())()","(())(())","(())()()","()((()))","()(()())","()(())()","()()(())","()()()()"]

    Everything (except for the order) looks fine to me? I don't think that a certain order is necessary at all.

  • 6

    Order is not the problem, actually judger does mind the order.

    Your output do not include (())(()).

  • 0

    Got it. Thank you

  • 0

    Maybe you should correct "judger does mind the order" to "judger doesn't mind the order" to make it a perfect selected answer :)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.