摘要: stcak<int>mystack; mystack.push(i);' mystack.pop(); mystack.top();//栈顶元素; mystack.size(); mystack.empty(); deque: deque<int>d; d.begin(); d.end(); d.s 阅读全文
posted @ 2016-08-10 17:00 maxandhchen 阅读(156) 评论(0) 推荐(0)
摘要: vector <int >myvec; myvec.pop_back(); insert: 注意是在迭代器位置之前进行插入操作; 1)myvec(myvec.begin(),5); 2)myvec(myvec.begin(),4,5); 3)myvec.insert(myvec.begin()+2, 阅读全文
posted @ 2016-08-10 16:44 maxandhchen 阅读(188) 评论(0) 推荐(0)
摘要: 定义: map<int ,char>newmap; 迭代器:std::map<int,cahr>::iterator it=newmap.begin()//newmap.end(); newmap.empty(); newmap.size(); newmap.insert(pair<int,char 阅读全文
posted @ 2016-08-10 16:23 maxandhchen 阅读(281) 评论(0) 推荐(0)
摘要: 概念: struct BinaryTree { int value; BinaryTree*pright; BinaryTree*pleft; } 满二叉树 完全二叉树 二叉搜索树 编程题: 实现二叉树的遍历: 递归的算法实现二叉树的遍历: 题一:树的子结构: vool hassubtree(Bin 阅读全文
posted @ 2016-08-10 15:58 maxandhchen 阅读(248) 评论(0) 推荐(0)