-
-
Notifications
You must be signed in to change notification settings - Fork 228
Update reverse-string
missing test cases
#917
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||
# Additional Instructions | ||||||
|
||||||
## Grapheme Clusters | ||||||
|
||||||
Unicode supports a lot of characters and languages. | ||||||
The displayed 'graphemes' are constructed from code points. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither graphemes nor code points are introduced before this sentence. An external link here might be useful as background info. |
||||||
Their combination and _order_ is the basis of the resulting grapheme. | ||||||
Imagine, a simple algorithm that might flip the 'dots' from one place to another during reversal: `Noël` becomes `leöN`. | ||||||
Now consider more [complex constructions][grapheme-construction] like the Bengali word `ঝিল্লি`, which consists of six code points. | ||||||
|
||||||
As graphemes make the string reversal process a lot more complicated, we made the respective test cases optional. | ||||||
You can try them out by setting the `TEST_GRAPHEMES` compiler flag or editing the test file accordingly. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
[grapheme-construction]: https://r12a.github.io/uniview/?charlist=%E0%A6%9D%E0%A6%BF%E0%A6%B2%E0%A7%8D%E0%A6%B2%E0%A6%BF | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me this sounds reasonable, but @BNAndras's points are valid. Having a few more external references probably wouldn't hurt. However, what I'm missing most here is something about how to approach this in C++. Simply using something like |
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.
Unicode is not introduced before this sentence. I'd similarly recommend an external link and perhaps a framing sentence about how Unicode is relevant before diving into the technical details.