2017年5月23日

【LeetCode】树的遍历

摘要: 非递归中序遍历: 思路:注释 非递归前序遍历: 阅读全文

posted @ 2017-05-23 15:37 暴力的轮胎 阅读(168) 评论(0) 推荐(0) 编辑

【LeetCode 33】Search in Rotated Sorted Array

摘要: Search in Rotated Sorted Array 分段有序的数组,二分查找返回下标,没有返回-1 数组有序之后经过 rotated, 比如:6 1 2 3 4 5 or 5 6 7 8 1 2 思路是: (1)nums[m] == target return m (2)必定有一段是有序的 阅读全文

posted @ 2017-05-23 14:23 暴力的轮胎 阅读(153) 评论(0) 推荐(0) 编辑

导航