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 阅读全文
posted @ 2020-11-30 20:23 cheshulin 阅读(44) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-11-30 19:31 cheshulin 阅读(43) 评论(0) 推荐(0)
摘要:/** * 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 阅读全文
posted @ 2020-11-26 16:25 cheshulin 阅读(66) 评论(0) 推荐(0)
摘要:/* 广度优先搜索模板 /* void BFS(int s){ queue<int> q; q.push(s); while(!q.empty()){ 取队首; 访问队首; 弹出队首; 队首元素下一层级的元素全部入队; } } */ //参见:https://leetcode-cn.com/prob 阅读全文
posted @ 2020-11-23 00:13 cheshulin 阅读(150) 评论(0) 推荐(0)
摘要:/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * Return an arr 阅读全文
posted @ 2020-11-22 23:06 cheshulin 阅读(145) 评论(0) 推荐(0)