stl-like binary search tree in C -
i need:
- binary search tree c library std::map
- with lower_bound operation
- with iterators stable across deletions
in c++ terms need following:
typedef std::map<k,v> map; typedef map::iterator iter; map m; ... (iter = m.lower_bound(x); != m.end(); ) { if (is_bad(it->second)) m.erase(it++); else it++; }
i can't use c++ though. tried libavl, not have lower_bound operation , traversing breaks after deletion afaiu.
adding lower_bound trb libavl easy. uploaded github:
https://github.com/user15/trb-lb
p.s.: note, goes under gpl may unsuitable proprietary code.
Comments
Post a Comment