Rank Tree in C++

后端 未结 4 1963
一生所求
一生所求 2020-12-19 01:41

We need ADT having search and rank features. That is, in addition to the interface of STL map, a function \'int get_rank(key)\' is required.

Standard implementation

4条回答
  •  清歌不尽
    2020-12-19 02:17

    you can use some other map like containers .
    keep a size fields can make binary search tree easy to random access .
    here is my implementation ...
    std style , random access iterator ...
    size balanced tree ...
    https://github.com/mm304321141/zzz_lib/blob/master/sbtree.h
    and B+tree ...
    https://github.com/mm304321141/zzz_lib/blob/master/bpptree.h

提交回复
热议问题