08 2021 档案
摘要:#include <sstream> int main(){ vector<string> arr; string s; getline(cin, s); stringstream ss(s); while(getline(ss, s, ' ')){ arr.push_back(s); } for(
阅读全文
摘要:struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} explicit ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, L
阅读全文
摘要:// // Created by Administrator on 2021/8/5. // #ifndef C__TEST01_NQUEENS_HPP #define C__TEST01_NQUEENS_HPP #include <iostream> #include <vector> #incl
阅读全文
摘要:定义一个二叉树 #ifndef C__TEST01_NODE_HPP #define C__TEST01_NODE_HPP #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #inc
阅读全文
摘要:定义二叉树 二叉树除了有左右孩子节点外还有父母节点parent 代码 //获取中序后继节点 class CNode{ public: int value; CNode *left; CNode *right; CNode *parent; CNode(int value): value(value)
阅读全文
摘要:###定义一个二叉树 #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <iostream> using namespace std; class Node{ pu
阅读全文
摘要:###定义一个二叉树 #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <iostream> using namespace std; class Node{ pu
阅读全文
摘要:###定义一个二叉树 #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <iostream> using namespace std; class Node{ pu
阅读全文
摘要:###定义一个二叉树 #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <iostream> using namespace std; class Node{ pu
阅读全文
摘要:// // Created by Administrator on 2021/8/1. // #ifndef C__TEST01_NODE_HPP #define C__TEST01_NODE_HPP #include <stack> #include <queue> class Node{ pub
阅读全文
摘要:// // Created by Administrator on 2021/8/1. // #ifndef C__TEST01_LINKNODE_HPP #define C__TEST01_LINKNODE_HPP #include <map> #include <unordered_map> #
阅读全文
摘要:// // Created by Administrator on 2021/8/1. // #ifndef C__TEST01_RADIXSORTED_HPP #define C__TEST01_RADIXSORTED_HPP #include <iostream> #include <vecto
阅读全文
摘要:// // Created by Administrator on 2021/8/1. // #ifndef C__TEST01_HEAPSORTED_HPP #define C__TEST01_HEAPSORTED_HPP #include <vector> #include <iostream>
阅读全文