The last important topic we will cover is multi-indexes. The standard library comes with many containers like vectors (dynamic array), lists (doubly-linked list), sets or maps. While all serve the same purpose of storing and accessing elements, each of them achieves this differently leading to different runtimes of fundamental operations - a set, for instance, maintains its elements in a sorted way, whereas a list does not yield random access but allows you to insert elements at any place in constant time without reallocating. They all provide a single specific way to access your elements, but sometimes we want to have multiple interfaces to the same data.
Read more