For real time, you should probably keep in mind that O(1) is amortized complexity, because the internal buffer might be reallocated if it was not made large enough from the start, and there's no separate reserve() operation that you could invoke at a "safe" time. But if you re...