TheAlgorithms-C/leetcode/src/344.c
2020-05-29 20:23:24 +00:00

12 lines
203 B
C

void reverseString(char *s, int sSize)
{
int last = sSize - 1, i;
for (i = 0; i < last; i++)
{
char tmp = s[i];
s[i] = s[last];
s[last] = tmp;
last--;
}
}