Ad
  • Custom User Avatar

    I believe it would return the following test case as true: validParentheses("())()(()")

    but that test case is not a valid use of parenthesis.

  • Custom User Avatar

    Hey jikehara,
    As I read it, the description says it is giving you an array of strings and non-negative numbers. It asks to filter out the strings but it does not ask to filter out negative numbers. It simply specifies that it won't be giving you any negative numbers. So I took this to mean, don't worry about negative numbers because they aren't a factor. In my opinion that is why the test cases don't have negative numbers.