07 2020 档案

摘要:解题的过程中有时候,根据题目的要求我们很难去自己实现一种满足题意的数据结构,但是如果我们对STL库比较熟悉的话,可以通过改写里面的一些库函数,从而满足题意的要求。在做题的过程中常见的一些方法主要是对小于号<进行改写。 对set中的<进行改写和对priority_queue中的<进行改写,主要是对这两 阅读全文 »
posted @ 2020-07-23 20:02 Veritas_des_Liberty 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2020-07-13 12:14 Veritas_des_Liberty 阅读(232) 评论(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 阅读全文 »
posted @ 2020-07-12 17:44 Veritas_des_Liberty 阅读(323) 评论(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 < 阅读全文 »
posted @ 2020-07-11 18:13 Veritas_des_Liberty 阅读(240) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示