Skip to content

Conversation

@EgorTarasov1
Copy link

stringReverse Improvement. Adding work with empty lines and other improvements.

stringReverse Improvement. Adding work with empty lines and other improvements.
Comment on lines +849 to +856
size_t left = 0;
size_t right = s->size - 1;
while (left < right) {
char tmp = s->data[left];
s->data[left] = s->data[right];
s->data[right] = tmp;
left++;
right--;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it better?

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.

2 participants