Conversation started Sep 19, 2014 at 0:39.
Sep 19, 2014 00:39
@Pip have a go at the reverse a string problem though ;)
Pip
Pip
Will :)
Without copying the string
I've found that the more constraints I have upon me in a given problem, the better the solution I write
Pip
Pip
Just take a for loop, loop through the character array starting at str.length() and counting down and add them to a new char array, then convert to string :)
@Pip ok, now do it without the other char array
Pip
Pip
can do it with substrings too :)
any other restrictions?
Sep 19, 2014 00:41
Try and do it in place (i.e. you modify the passed in string, and do no assign another string to it later)
you simply modify the characters of the passed in string, without copying it or similar (i.e. the char array thing)
and without using and Java library methods
 
Conversation ended Sep 19, 2014 at 0:42.