4 ms·
Because in many languages, this is trivial to the level of calling .reverse() on the array.
by bragh 9y ago
Because in many languages, this is trivial to the level of calling .reverse() on the array.
- dragonwriter 9y agoSure, but in some of the popular languages where that is the case, .reverse() is no more (and no less) a “library feature” than creating or indexing an Array.
- walrus1066 9y agoIn which case, the question isn't really relevant to the job. Same goes for stuff like sorting algos. Why not pose problems more representative of the job and business domain?