2 ms·
If I was asked this question and I could express the answer in C++, then I would say list::reverse. It seems (to me) that more important than this question is
by 16s 16y ago
If I was asked this question and I could express the answer in C++, then I would say list::reverse.
It seems (to me) that more important than this question is knowing when to use one data structure over another (pros and cons) is more important than being able to manipulate one specific data structure during an interview process.