Is there already some std::vector based set/map implementation?

前端 未结 6 1532
囚心锁ツ
囚心锁ツ 2021-02-08 07:43

For small sets or maps, it\'s usually much faster to just use a sorted vector, instead of the tree-based set/map - especially for something like 5-10 e

6条回答
  •  旧巷少年郎
    2021-02-08 08:40

    I don't know any such implementation, but there are some functions that help working with sorted vectors already in STL, such as lower_bound and upper_bound.

提交回复
热议问题