增删改案列
#include <iostream>
#include <unordered_map>
using namespace std;
typedef unsigned int TrieKey;
typedef unordered_map<TrieKey, int> NextMap;
typedef pair<int, int> TreeNode;
int main() {
NextMap *tree = new NextMap();
tree->insert(make_pair(999, 1));
tree->insert(make_pair(999, 2));
tree->insert(make_pair(999, 3));
tree->insert(make_pair(9991, 4));
NextMap::iterator a = tree->find(999);
if (tree->end() != a) {
a->second = 55;
}
tree->insert(make_pair(999, 4));
cout << tree->find(999)->second << endl;
tree->erase(9991);
if (tree->find(9991) == tree->end()) {
cout << "不存在" << 9991 << endl;
}
system("pause");
return 0;
}