in reply to Re^3: rand + shift || pop
in thread rand + shift || pop

It's only O(1) if you remove from the start or the end.