Removes the value at the front or back of the container. The stable
version behaves the same, but guarantees that ranges iterating over
the container are never invalidated. The optional parameter howMany instructs removal of that many elements. If howMany > n,
all elements are removed and no exception is thrown.
Removes the value at the front or back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. The optional parameter howMany instructs removal of that many elements. If howMany > n, all elements are removed and no exception is thrown.
Precondition: !empty
Complexity: O(log(n)).