Ad
  • Default User Avatar

    It is a bit fuzzy but "determines if the order of the parentheses is valid" from the problem description leads to returning true for empty strings. There are no invalid parenthesis in the empty string. But honestly that input is invalidated by the first sentance of the description so it likely should be out of scope.

  • Default User Avatar

    I would suggest trying to go about another approach. Wrong or right (obviously it is wrong) this code would not fare well in an interview due to readability and being overly complex. Keep up the effort :)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution