Practice Test Geeks home

CodeSignal Technical Assessment Array and String Manipulation Questions and Answers

A programmer needs to reverse the order of words in a given string, where words are separated by single spaces.
For example, 'codesignal is awesome' should become 'awesome is codesignal'.

Which of the following approaches is the MOST efficient in terms of time complexity for a typical programming language?

Select your answer