维基百科 百度百科
名称 *
别名ID
等级 所属
排序 上位
类型 日期
备注
修改子项 修改信息 添加子项 添加资源

Items
Dev-C++ Edit 2021-12-30

Resources
STL排序查找 Edit
STL sort sort(arr+n1, arr+n2, sortMethod() ); struct sortMethod { bool operator( const int & a1, const int & a2) { return a1 < a2; } } STL search binary_search(arr+n1, arr+n2, val, sortMethod); T* lower_bound(arr+n1, arr+n2, val, sortMethod); find from first to the last, arr[n] >= val T* upper_bound
平衡二叉树multiset,map Edit 2021-12-31
平衡二叉树结构,时间复杂度都是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++)