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

Add matching brackets exercise #113

Merged
merged 4 commits into from
Jun 22, 2024

Conversation

kahgoh
Copy link
Member

@kahgoh kahgoh commented Jun 16, 2024

(Also updated config.json to add references to exercise files)

This is one of the 48in24 exercises.

- Also updated config.json to add references to exercise files.
Copy link

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.

@github-actions github-actions bot closed this Jun 16, 2024
- Make difficulty similar to sieve.
Copy link
Contributor

@keiravillekode keiravillekode left a 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
Copy link
Contributor

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.

@keiravillekode
Copy link
Contributor

Let's add an instructions.append.md

My suggestion would be to copy exercises/practice/rotational-cipher/.docs/instructions.append.md which gives the student permission to modify the input buffer.

@kahgoh
Copy link
Member Author

kahgoh commented Jun 19, 2024

Thanks for the review @keiravillekode! I have pushed the commits for the difficulty and the adding the instructions.append.md. I can't see it here on the PR yet, but I assume they'll become visible when re-opened.

)

;; Use some space to store info about the brackets we come across
(call $initBracketStack
Copy link
Contributor

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.

@ErikSchierboom ErikSchierboom merged commit 01a866e into exercism:main Jun 22, 2024
2 checks passed
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.

3 participants