Skip to content

Optimize 0020-valid-parentheses.java implementation with simplified condition logic #3015

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

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

AndrewNikolin
Copy link
Contributor

Before
Screenshot 2023-09-19 at 23 06 33

After
Screenshot 2023-09-19 at 23 06 43

Inverted nested condition logic, which allows the elimination of the outer condition

Important

Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

@sujal-goswami sujal-goswami merged commit 26994d8 into neetcode-gh:main Sep 20, 2023
@AndrewNikolin AndrewNikolin deleted the patch-1 branch September 20, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants