While I don't think those questions should be part of the interviewing process, I disagree with this. Answering "use a library" is not giving an indication of your skillset. I would consider that failing answer. I'd prefer to see someone try to work the answer out and get it wrong instead, because it's the working-out process that gives you any insight into the candidate's skillset.
I failed to get the job.
That company has a massive staff turnover, and as well as other high profile foul ups, has recently been responsible for updating the details of hundreds of benefits recipients with identical address values.
I also had this same experience with another company 15 years ago that is what recruiters call evergreen (always hiring). This is because they have similar archaic practices and I've been told the turnover is because they have a huge mashup of custom code and implementations. Difference of experience Vs academic in my small circle :)
The most optimal way is not to reverse the array at all, but instead index it in reverse later in the code when it's used.
What they should be asking you is to show the most optimal way to reverse the array, which is to find a popular highly optimised library and use that, one that is also likely to be far less buggy.
Algorithmic implementation screams academic, practical implementation yells experience.