I'm looking for standard container (if any exists) that will have constant time for:
I can program it by myself, but why bother if it could already exist in std
?
std::deque is your friend. It's a double-ended queue with random access to elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With