3 ms·If you know the length of the initial list (and that's obviously possible in O(N)), it's all easy.by pklausler 9y agoIf you know the length of the initial list (and that's obviously possible in O(N)), it's all easy.