In 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?
Sure, 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.