Skip to content

Balance Paren test cases missing test for extra closing parens #6

Description

@NealHumphrey

It is possible to write a function that passes all current tests in the Balanced Parentheses Check problem but that fails with an IndexError if a closing parentheses occurs when there is an empty stack.

Adding this test case handles the issue:

assert_equal(sol('][[[]])]'),False)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions