自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 [Algorithm]九章必背程序--stack:Non Recursion

66. Binary Tree Preorder Traversal :点击打开链接/** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { *

2017-05-13 10:20:05 371

原创 [Algorithm]九章五.DFS

做DFS的题,想象构造树非常关键,把树构造的过程梳理清楚了,自然递归的步骤也就出来了。17. Subsets: 点击打开链接思路:对于[1,2,3] [ ] [1] 这边的1是在[ ]的基础上添加的 [1,2] [1,3] 所以倒回来到[1,3]的时候也应该知道是在[1]的基础上添加的[1,2,3]因为这层是在[...

2017-05-13 09:58:19 522

原创 [Leetcode] Path Sum I,II,III

112. Path Sum I: 点击打开链接/** * Definition for a binary tree node. //判断是否有这样的路径满足和为sum * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(i

2017-05-12 00:40:23 375

原创 [Algorithm]九章四:BSF

69. Binary Tree Level Order Traversal:点击打开链接Time: O(n)/** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(...

2017-05-11 08:53:47 631

原创 [Algorithm]九章三:Binary Tree & Divide Conquer

97.Maximam Depth of Binary Tree: 点击打开链接/* Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val) { * ...

2017-05-06 05:04:02 430

原创 [Algorithm] 九章二:Binary Search

457.经典二分叉中分问题:点击打开链接注意:二分查找模板         牢记二分查找精髓,不断缩小范围,然后手动找出结果(并不是在缩小范围的时候就一定能找到结果)         public class Solution { /** * @param nums: An integer array sorted in ascending order *...

2017-05-02 05:22:57 411

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除