What is the difference between std::list<std::pair>
and std::map
? Is there a find
method for the list, too?
std::map<X, Y>
:
X
s) onlyfind()
method (O(log n)
) which finds the Key-Value pair by Keymap[key]
, which is also faststd::list<std::pair<X, Y> >
:
X
s and Y
s. They remain in the order you put it in.list
is O(N)
(no special method)splice
method.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