Conversation started Sep 19, 2014 at 0:39.
OMGtechy
Sep 19, 2014 00:39
@Pip have a go at the reverse a string problem though ;)
Pip
Will :)
OMGtechy
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
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 :)
OMGtechy
@Pip ok, now do it without the other char array
Pip
can do it with substrings too :)
any other restrictions?
OMGtechy
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.
View all rooms
Reverse String Challenge
Sep '14
19
Game Development
Game development and other polite discussion. Game development...
1
context of the conversation
join this room
about this room
Participants
OMGtechy
63%
Pip
36%
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile