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

2116. Check if a Parentheses String Can Be Valid #191

Open
RAJKUMAR1301 opened this issue Oct 6, 2023 · 4 comments
Open

2116. Check if a Parentheses String Can Be Valid #191

RAJKUMAR1301 opened this issue Oct 6, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest hacktoberfest contributions

Comments

@RAJKUMAR1301
Copy link

Description

  1. Check if a Parentheses String Can Be Valid

DSA Problem

A parentheses string is a non-empty string consisting only of '(' and ')'. It is valid if any of the following conditions is true:

It is ().
It can be written as AB (A concatenated with B), where A and B are valid parentheses strings.
It can be written as (A), where A is a valid parentheses string.
You are given a parentheses string s and a string locked, both of length n. locked is a binary string consisting only of '0's and '1's. For each index i of locked,

If locked[i] is '1', you cannot change s[i].
But if locked[i] is '0', you can change s[i] to either '(' or ')'.
Return true if you can make s a valid parentheses string. Otherwise, return false.

@RAJKUMAR1301 RAJKUMAR1301 added enhancement New feature or request good first issue Good for newcomers hacktoberfest hacktoberfest contributions labels Oct 6, 2023
@RAJKUMAR1301
Copy link
Author

@iamdestinychild Kindly assign me!

@nikzayn
Copy link

nikzayn commented Oct 8, 2023

@RAJKUMAR1301 I will add a solution in golang.!

@iamdestinychild
Copy link
Owner

iamdestinychild commented Oct 8, 2023

@nikzayn create an issue that you want to add a solution in Golang so I can assign it to you, please read the contribution.md

@ujjwalshivhare
Copy link

@nikzayn Sir ,
can you assign me this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest hacktoberfest contributions
Projects
None yet
Development

No branches or pull requests

4 participants