Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kx0101/valid-parentheses


https://github.com/kx0101/valid-parentheses

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# LeetCode - Valid Parentheses

## Runtime: 3 ms, faster than 53.11% of Java online submissions for Valid Parentheses.
## Memory Usage: 42.2 MB, less than 38.21% of Java online submissions for Valid Parentheses.

We want to use a stack. When we come across an opening parentheses, we want to push it onto the stack. When we come across a closing parentheses, we want to check to make sure it matches the most recent opening parentheses, which will be on the top of the stack