Frage im Vorstellungsgespräch bei Rakuten

How to reverse a string without using extra memory?

Antworten zu Vorstellungsgespräch

Anonym

6. März 2014

I have never heard of it before that time. I think there are some answers on the web about it

1

Anonym

23. Juni 2015

Print recursively..

Anonym

24. Okt. 2016

public void reverse(char s[]){ for(int i=0,j=s.length-1;i<=j;i++,j--){ s[i] ^= s[j]; s[i] ^= (s[j] ^= s[i]); } }