自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Tree110BalancedBinaryTree

树的深度

2016-09-25 10:51:57 190

原创 Tree107BinaryTreeLevelOrderTraversal2

BinaryTreeLevelOrderTraversal Bottom Up

2016-09-25 08:04:47 208

原创 BM190ReverseBits

思路Use char array注意If you change the variable on it’s own in the if logic, remember to use else if or it may deal with the changed result rather than original valueFailed case4294967295超出int范围,话说这种

2016-09-24 23:06:41 157

原创 BM CC150 Ch5 BM53

之前的错误思路之后的正确思路

2016-09-23 11:56:00 407

原创 BM191NumberOf1Bits

Pre-defined MethodsInteger.toBinaryString(int n) return binary stringInteger.toBinaryString(int n).toCharArray() directly to array. 思路知道可以用位运算,但是不会应用,参考discussion https://discuss.leetcode.com/top

2016-09-17 05:02:44 198

原创 Tree111MinimumDepthOfBinaryTree

思路用recursive,但要注意审题,详见“注意”注意根据题目要求,一定要到了leaf才算,因此root比较特殊

2016-09-12 12:55:53 283

原创 Tree104MaximumDepthOfBinaryTree

求maximum Depth的三种思路:Recursive, BFS DFS

2016-09-12 00:02:17 209

原创 Tree102BinaryTreeLevelOrderTraversal

二叉树BinaryTree level order traversal

2016-09-08 10:50:12 268

原创 Tree226InvertBinaryTree

思路mirrorTree by linkedList DFS或者BFSRecursive Logic Flaw1LogicFlaw当有val的时候,left和right有可能为null ( 叶子节点),但是当root == null的时候,根本就没有left和right啊,小心NullPointerException InvertTreeByRecursive2() 利用这个null的特

2016-09-07 23:04:31 184

原创 Tree的各种Methods

镜面反转BinaryTree见Tree101SymmetricTree private methods MirrorTree()

2016-09-07 03:23:51 296

原创 Tree101SymmetricTree

上一级: SameTree

2016-09-06 03:01:21 152

原创 Tree100SameTree

判断两个树是否相同identical treeMethods思路Tricks总结

2016-09-06 02:28:53 306

原创 String的常用pre-defined methods

String常用方法StringBuilder

2016-09-04 10:35:08 510

原创 String165CompareVersionNumbers

version number comparisonLeading 0 problemString with delimiter

2016-09-04 10:13:59 204

原创 String13 String12 Integer<->Roman Easy&Medium

总是觉得懒惰的罗列方法更简单,但写起来发现重复的太多,还是通用方法比较好。intToArray()方法写了好多思路总结

2016-09-02 03:37:10 251

原创 String13RomanToInteger

roman to integerString13 easy leetcodestringBuilder

2016-09-02 01:32:04 182

原创 String38Count and Say

String 38 Count and Say字符串里面的数字统计Logic Flaws连续数字的count和整个string的index不应该是同一个注意第三层统计(while-count)和第二层统计(for-j)之间,也就是for里面带着whil

2016-09-01 12:21:07 190

空空如也

空空如也

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

TA关注的人

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