随笔分类 - 数据结构与算法
摘要://欢迎指正!!!////有向图找环//输入n条边 const int maxvex = 500; int graph[maxvex][maxvex] = {0};//邻接矩阵 set<int>vexs;//顶点容器 bool visitted[maxvex] = {false};//访问数组 ve
阅读全文
摘要:struct Node { int val; Node* next; Node* random; Node(int x, Node* pt1, Node* pt2) :val(x), next(pt1), random(pt2) {} }; class Solution { public: Node
阅读全文
摘要:struct BinaryTreeNode { int nvalue=0; BinaryTreeNode* pleft = nullptr; BinaryTreeNode* pright = nullptr; BinaryTreeNode* parent = nullptr;};准备一个队列,通过不
阅读全文

浙公网安备 33010602011771号