Sunrisepeak / dstruct

🔥An easy-to-port/learn/use C++ data structure template library | 一个易于移植/使用/学习且结构简洁的数据结构模板库
https://github.com/Sunrisepeak/DStruct
Apache License 2.0
38 stars 2 forks source link

Add support for Maps #51

Open ElCapor opened 4 months ago

ElCapor commented 4 months ago

It would be very cool to have an alternative to std::map in this library thanks !

Sunrisepeak commented 4 months ago

It would be very cool to have an alternative to std::map in this library thanks !

map is a adapter in dstruct, now have a implement by avl tree to support map's basics function.

map-adapter

https://github.com/Sunrisepeak/DStruct/blob/31522d6e0edd536fba3f0110c0eb27101feab91e/core/ds/Map.hpp#L50

examples

https://github.com/Sunrisepeak/DStruct/blob/31522d6e0edd536fba3f0110c0eb27101feab91e/examples/map.cpp#L19-L50

but it is very basic implementation. later, will add more underlying implementations can be chosen.(rb-tree....

ElCapor commented 4 months ago

Thank you very much sir ! I will use this and keep looking forward this project.