RunestoneInteractive / RunestoneInteractive/rs
Incorrect Example Code - C++ 240-0C1 3.7 Balanced Symbols
@pearcej is already working on this.
Since Jan 15, 2025.
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 117
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 24
Description
In Oakton CSC-240-0C1 section 3.7 https://runestone.academy/ns/books/published/CSC-240-0C1-CPlusPlusDS-OaktonCollege-Spring2025/LinearBasic/BalancedSymbolsGeneralCase.html the example code in C++ doesn't work as intended because it doesn't check the index of the open symbol against the index of the closed symbol in matches(), only that there is an opening symbol to pair with the closing symbol. The Python implementation does check index, and so doesn't suffer this bug. This can be confirmed as a C++ only bug by testing "( [ ) ]" in each language; C++ sees it as a pass, because it isn't checking parentheses versus brackets, whereas Python fails it. Images attached with only my test line added to each language - code is otherwise unaltered from what is presented as the example.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.