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


  • 1
    B

    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
    S

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

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


  • 0
    B

    Got it. Thank you


  • 0
    P

    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.