07 2020 档案
发表于 2020-07-23 20:02阅读:723评论:0推荐:0
摘要:解题的过程中有时候,根据题目的要求我们很难去自己实现一种满足题意的数据结构,但是如果我们对STL库比较熟悉的话,可以通过改写里面的一些库函数,从而满足题意的要求。在做题的过程中常见的一些方法主要是对小于号<进行改写。 对set中的<进行改写和对priority_queue中的<进行改写,主要是对这两
阅读全文 »
发表于 2020-07-13 12:14阅读:232评论:0推荐:0
摘要:
阅读全文 »
发表于 2020-07-12 17:44阅读:323评论:0推荐:0
摘要:Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following: The number of people in each
阅读全文 »
发表于 2020-07-11 18:13阅读:240评论:0推荐:0
摘要:前序遍历的非递归实现 1 void PreOrder2(BTNode *root) { 2 BTNode *p = root; 3 stack<BTNode *> S; 4 while (p != NULL || !S.empty()) { 5 if (p) { 6 cout << p->val <
阅读全文 »