What is the difference between the two? I mean the methods are all the same. So, for a user, they work identically.
Is that correct??
See Question&Answers more detail:osWhat is the difference between the two? I mean the methods are all the same. So, for a user, they work identically.
Is that correct??
See Question&Answers more detail:osLet me list down the differences:
Complexity
Insert/erase at the beginning in middle at the end
Deque: Amortized constant Linear Amortized constant
List: Constant Constant Constant