This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
I solved the program using two pointers, one for traversing the string and one for keeping the initial position.
Two variables for counting the opening and closing parenthesis.
When the number of opening and closing parathesis are equal, we found the primitive string and added the content of it to the ans string.
Screenshots(Attach 2 screenshots of your own input and output) -
Attach here
Checklist:
All the conditions should be fulfilled for considering your code for merging -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.
Choose your form and fill it -
1. Form 1(C++ Solution contributors)
1) Form 1
Issue Id you have worked upon -
Fixes #520
Briefly explain your program logic -
I solved the program using two pointers, one for traversing the string and one for keeping the initial position.
Two variables for counting the opening and closing parenthesis.
When the number of opening and closing parathesis are equal, we found the primitive string and added the content of it to the ans string.
Screenshots(Attach 2 screenshots of your own input and output) -
Attach here
Checklist:
All the conditions should be fulfilled for considering your code for merging -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.