C-Plus-Plus
C-Plus-Plus copied to clipboard
feat: add reverse map data structure with value based sorting
Description of Change
Added ReverseMap container with: insert(key, value) to build the map to_vector() to output a (key, value) list sorted.
Checklist
- [x] Added description of change
- [x] Added file name matches File name guidelines
- [x] Added tests and example, test must pass
- [x] Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
- [x] Relevant documentation/comments is changed or added
- [x] PR title follows semantic commit guidelines
- [x] Search previous suggestions before making a new one, as yours may be a duplicate.
- [x] I acknowledge that all my contributions will be made under the project's license.
Notes: Implements "ReverseMap", a container that inverts key->value pairs and produces a vector of (key, value) sorted by value.