Closed
Description
It's not clear to me whether index 0 is the front or the back of the deque. For example, the std::collections::vec_deque
module docs only say "It also has O(1) indexing like a vector." and the documentation of VecDeque::get
only states "Retrieves an element in the VecDeque by index." and the example retrieves the middle element of a three-element deque. From the iteration order, or the example in swap
, I can infer that it's from the front (and of course I could try it out) but it's would have saved me some time if it was just stated up-front in the relevant locations.
Metadata
Metadata
Assignees
Labels
No labels