Oct-17-2020, 03:25 PM
(This post was last modified: Oct-17-2020, 03:27 PM by Gribouillis.)
buran Wrote:I may misunderstand your point thoughdeques are perfect if the program pushes and pops many items at the ends of the deque. It is perfect for stacks and fifos, but if the programs wants to access many times an element in the middle of the deque, it could be very inefficient because accessing the n-th element involves dereferencing n pointers. The getitem has a performance in O(n)