-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add matching brackets exercise #113
Add matching brackets exercise #113
Conversation
- Also updated config.json to add references to exercise files.
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
- Make difficulty similar to sieve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
config.json
Outdated
"uuid": "45892c58-05f0-4dc4-ac7d-99babf8d3006", | ||
"practices": [], | ||
"prerequisites": [], | ||
"difficulty": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this difficulty 5 or 6.
Let's add an My suggestion would be to copy |
Thanks for the review @keiravillekode! I have pushed the commits for the difficulty and the adding the |
) | ||
|
||
;; Use some space to store info about the brackets we come across | ||
(call $initBracketStack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can simply have
(call $initBracketStack (local.get $text))
Once we have read the first characters of $text
, their memory can be reused for the bracket stack.
With the current tests it does not matter, but it would be important if we had a test where the input was more than 127 bytes long, and was all opening brackets.
(Also updated config.json to add references to exercise files)
This is one of the 48in24 exercises.