Repository navigation
feat: add TypeScript solution for Valid Parentheses (practice1) - #196
Merged
Merged
Conversation
Owner
|
@painbaba Hi there! Thanks for the contribution.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
First TypeScript solution for the repo, as requested in #192:
solutions/typescript/practice1.ts, a port of the existing Python Valid Parentheses solution (solutions/python/practice410.py) so learners can compare the two side by side.Record<string, string>), the stack (string[]), and the test-case list (Array<[string, boolean]>).node solutions/typescript/practice1.ts.This makes TypeScript the fourth language for this problem alongside Python, JavaScript, and Java.
Related issue
Closes #192
Validation
node solutions/typescript/practice1.tson Windows, Node v24.17.0 (native TypeScript type-stripping):All 9 test cases passed!python -I scripts/check_solution_headers.py --base upstream/main --head HEAD): passed.Checklist
solutions/<language>/folder (solutions/typescript/, new language folder, lowercase) and follows thepractice<n>naming convention.