Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid Parenthesis #36

Open
mikelane opened this issue Oct 5, 2018 · 4 comments
Open

Valid Parenthesis #36

mikelane opened this issue Oct 5, 2018 · 4 comments
Labels
Hacktoberfest intermediate intermediate challenges

Comments

@mikelane
Copy link
Contributor

mikelane commented Oct 5, 2018

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

An input string is valid if:

  • Open brackets must be closed by the same type of brackets.
  • Open brackets must be closed in the correct order.
  • Note that an empty string is also considered valid.

Examples:

has_valid_parens("()")
True
has_valid_parens("()[]{}")
True
has_valid_parens("(]")
False
has_valid_parens("([)]")
False
has_valid_parens("{[]}")
True

@Daviddager
Copy link

This issue does not have a difficulty associated

@mikelane
Copy link
Contributor Author

mikelane commented Oct 5, 2018

I'm unable to assign labels. It is an easy difficulty.

@akashsara
Copy link
Contributor

Can I take this?

@Tijs-B
Copy link
Contributor

Tijs-B commented Oct 6, 2018

Pull request #67 solves this.

the-vampiire pushed a commit that referenced this issue Oct 21, 2019
* Profile Lookup #2 Solution

* Valid Parenthesis
the-vampiire pushed a commit that referenced this issue Oct 21, 2019
* Solution for issue #1

* Create valid-parenthesis_ljsauer.py

* Delete sum-of-all-numbers_ljsauer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest intermediate intermediate challenges
Projects
None yet
Development

No branches or pull requests

5 participants