11 2020 档案
摘要:typedef struct Stack_T { int *stk; // 也可以用固定值 int cnt; } Stack_S; Stack_S g_stack = {0}; void StackInit(int size) { g_stack.cnt = 0; g_stack.stk = (in
阅读全文
摘要:typedef struct Que_T { int head; int rear; int size; Graph_S *que[10000]; } Que_S; Que_S g_que; void QueInit() { g_que.head = 0; g_que.rear = 0; g_que
阅读全文
摘要:/** * Note: The returned array must be malloced, assume caller calls free(). */ #define MAX_IP_ADR 1000 #if 0 int IsValid(char* s, int i, int j) { int
阅读全文
摘要:/* 广度优先搜索模板 /* void BFS(int s){ queue<int> q; q.push(s); while(!q.empty()){ 取队首; 访问队首; 弹出队首; 队首元素下一层级的元素全部入队; } } */ //参见:https://leetcode-cn.com/prob
阅读全文
摘要:/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * Return an arr
阅读全文
浙公网安备 33010602011771号