pivot
methods getFirst() and getLast(), randomizedIndex