- 博客(6)
- 资源 (5)
- 收藏
- 关注
原创 Leetcode - Move Zeroes
Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling your funct
2016-08-30 14:30:55 441
原创 leetcode- Preorder/Inorder/PostOrder without Recursive
Recursive solution is trivial方法一(麻烦):/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(
2016-08-30 14:14:53 461
原创 Leetcode-Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the
2016-08-26 11:07:25 350
原创 leetcode-MaxDepth of a binaryTree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.两种递归: int maxDepth(TreeNode* root) {
2016-08-26 11:04:43 466
原创 Leetcode-Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20
2016-08-25 11:24:49 439
原创 Git常用命令
为了方便自己查询,将最近用到的Git命令整理如下: git init # 在本地建立一个仓库 git clone (repository) # git clone默认会把远程仓库整个给clone下来 git status git add modified_file #可以用Regular Expression匹配多个文件 git bra
2016-08-23 18:41:06 314
重构与模式
2015-09-30
Java实现高级计算器
2015-05-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人