![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
文章平均质量分 69
聆风188
这个作者很懒,什么都没留下…
展开
-
leetcode分类
利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-parentheses/(也可以用一维数组,贪心) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17.原创 2021-04-08 09:40:21 · 73 阅读 · 0 评论 -
Binary search (sorted array) 二分法
1、首先面临使用recursion(递归)or while-loop(while循环)此处用while-loop,工程一般要求别用递归。keypoints: 1、start + 1 3、A[mid] ==, 4、A[start] A[end] ? target解释:1.start + 1 2.防止数太大溢出,显得你很细心原创 2016-12-26 16:40:53 · 252 阅读 · 0 评论 -
二叉树递归
给定一棵二叉查找树和一个新的树节点,将节点插入到树中。你需要保证该树仍然是一棵二叉查找树。您在真实的面试中是否遇到过这个题? Yes 样例 给出如下一棵二叉查找树,在插入节点6之后这棵二叉查找树可以是这样的:2 / \ 1 4 –> / 3 2 / \ 1 4 / \ 3 6****我的解原创 2016-11-30 23:26:10 · 136 阅读 · 0 评论