摘要: 链接: https://pan.baidu.com/s/1 covfUP6LWWCMxAHQrDLlw 提取码: yicg 关注公众号"b哥资源",获取更多资源 网上的大部分都要积分什么的,很麻烦。这本很清晰,分享给大家。 阅读全文
posted @ 2019-03-05 08:19 UniMilky 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 可重入函数 在 实时系统的设计中,经常会出现多个任务调用同一个函数的情况。如果这个函数不幸被设计成为不可重入的函数的话,那么不同任务调用这个函数时可能修改其他任 务调用这个函数的数据,从而导致不可预料的后果。那么什么是可重入函数呢?所谓可重入是指一个可以被多个任务调用的过程,任务在调用时不必担心数据 阅读全文
posted @ 2017-09-04 22:08 UniMilky 阅读(311) 评论(0) 推荐(0) 编辑
摘要: ``` /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode... 阅读全文
posted @ 2017-07-13 14:39 UniMilky 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 迭代: 递归 阅读全文
posted @ 2017-07-13 13:50 UniMilky 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 思路: 先翻转,然后相加。(需要多了解一些操作字符串的函数,能方便好多)。 class Solution { public: string addBinary(string a, string b) { string res = ""; int carry = 0; int valA; int va 阅读全文
posted @ 2017-06-17 10:11 UniMilky 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 思路: 细节题,应该不断和面试官交流确定一些特殊情况。 阅读全文
posted @ 2017-06-17 09:26 UniMilky 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 思路: 暴力: class Solution { public: int strStr(string haystack, string needle) { if(needle.length() == 0) return 0; bool res = true; int len1 = haystack. 阅读全文
posted @ 2017-06-16 09:31 UniMilky 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 思路: 开始想的是先把特殊符号去掉,但是超时了。事实上直接在遍历中处理就行了。 "参考" class Solution { public: bool isPalindrome(string s) { int left = 0, right = s.length() 1; while(left 阅读全文
posted @ 2017-06-16 08:42 UniMilky 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 思路: 栈的应用。如果是'(','{','[',则只需入栈即可,如果是'}',']',')',则要看栈顶的字符是否和其匹配。 class Solution { public: bool isValid(string s) { stack res; for(int i = 0; i 阅读全文
posted @ 2017-06-16 07:16 UniMilky 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 思路: 递归,利用level表示第几层。 迭代,利用队列,一层一层进行遍历。 阅读全文
posted @ 2017-06-15 16:34 UniMilky 阅读(97) 评论(0) 推荐(0) 编辑