От: | Тёмчик | жж | |
Дата: | 12.10.18 10:56 | ||
Оценка: | -3 |
void reverse( char[] s, int start, int length)
{
if (length > 1) {
s[start] ^= s[start+length-1];
s[start+length-1] ^= s[start];
s[start] ^= s[start+length-1];
reverse(s, start+1, length-2);
}
}