Frage im Vorstellungsgespräch bei Tripadvisor

Write a function that reverses a string

Antworten zu Vorstellungsgespräch

Anonym

3. Jan. 2012

put letters into a char array, create a new char array of the same size, loop through the first array backwards and insert letters into the new array, return the new array

Anonym

28. Feb. 2012

At above Why create a new char array when you can reverse in place?