http://qs321.pair.com?node_id=878310


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.