0 | 平衡二叉树multiset,map | 2021-12-31 | Edit | ||
平衡二叉树结构,时间复杂度都是log(n)
multiset, set, multimap, map
multiset<T> st;
insert, find, erase
lower_bound, upper_bound
map<int, string> m;
m.insert(map<int, string>::value_type(num, str));
map<int, string>::iterator rec = m.begin();
rec = m.find(key) ;
if(rec == m.end()) {}
for( ; rec != m.end(); rec++)
|