自定义博客皮肤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)
  • 收藏
  • 关注

原创 Leetcode--65. Valid Number

好吧。。败给这道题了。本来想着直接按空格、加减号、数字、点、数字、e、加减号、数字、空格的顺序处理的,结果发现还是不对,就改为了标记位方法,结果修改倒是好修改了,情况还是不好考虑全!!!改了好几次。Validate if a given string is numeric.Some examples: “0” => true ” 0.1 ” => true “abc” => false “1

2016-11-06 15:58:23 176

原创 Leetcode--62. Unique Paths

Unique Paths A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to r

2016-11-06 14:35:39 179

原创 Leetcode 42. Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1], ret

2016-11-04 14:31:28 216

原创 树的三种非递归java实现

*前序: 1、首先访问节点,之后将节点放入栈中,方便后期访问该节点的又节点;之后让遍历节点指向左节点; 2、当当前访问节点为空,说明栈顶左子树已经遍历完毕;此时,出栈,指向出栈右节点;转1*public List<Integer> preorderTraversal(TreeNode root) { ArrayDeque<TreeNode> stack = new ArrayDe

2016-10-19 22:04:58 247

原创 leetcode-- 130. Surrounded Regions

参考:http://blog.csdn.net/worldwindjp/article/details/19251995 Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all ‘O’s int

2016-10-05 21:56:09 162

原创 Leetcode 120. Triangle

Leetcode 120. Triangle For example, given the following triangle [ [2], [3,4], [6,5,7], [4,1,8,3] ] The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11).思路:

2016-10-01 19:27:11 242

空空如也

空空如也

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

TA关注的人

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