Question: how stl map is implemented?
Answer: STL Map Internal Implementation: It's implemented as a self-balancing red-black tree. ... To balance the tree after an insertion/update both algorithms use the notion of rotations where the nodes of the tree are rotated to perform the re-balancing.