05 2019 档案

摘要:int trap(int* height, int heightSize) { int ans = 0, top = -1; int *stack = (int *)malloc(sizeof(int) * heightSize); for (int i = 0; i < heightSize; i 阅读全文
posted @ 2019-05-26 17:49 Lee先森的博客 阅读(155) 评论(0) 推荐(0)
摘要:struct Stack { char *val; int top, maxSize; }; void init(struct Stack *s, int maxSize) { s->val = malloc(maxSize); s->top = 0; } bool empty(struct Sta 阅读全文
posted @ 2019-05-18 13:59 Lee先森的博客 阅读(210) 评论(0) 推荐(0)
摘要:利用滑动窗口加二分,其中二分的情况为前面全是1,后面全是0,找最后一个1出现的位置 阅读全文
posted @ 2019-05-11 09:36 Lee先森的博客 阅读(270) 评论(0) 推荐(0)