自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Sum Root to Leaf Numbers 求路径之和

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the tota

2014-04-25 20:42:26 573

原创 二叉树最大 最小深度

二叉树求最大,最小深度是二叉树很基本的问题。在此给出

2014-04-22 12:30:54 1106

原创 Binary Trees 斯坦福教育库

Binary Treesby Nick ParlanteThis article introduces the basic concepts of binary trees, and then works through a series of practice problems with solution code in C/C++ and Java. Binary trees

2014-04-18 20:39:28 1115

原创 Minimum Depth of Binary Tree 二叉树最小深度

///** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { pub

2014-04-17 22:46:04 669

转载 运用快慢指针判断链表是否有环

例题可以参见LeetCode中的Linked List

2014-04-15 19:01:06 887

原创 java中栈与队列的实现

虽然大部分人学习数据结构都用的是C或者C++来实现代码,最坑爹的就是cong'jin'mian

2014-04-15 18:31:24 769

原创 关于二叉树后续遍历算法的一点思考

二叉树的三种遍历方式,最贱的那个

2014-04-15 18:19:35 529

转载 后序遍历 Binary Tree Postorder Traversal -- LeetCode

二叉树的后序遍历我们还是介绍三种方法,第一种是递归,第二种是迭代方法,第三种是用线索二叉树。 递归还是那么简单,算法的时间复杂度是O(n), 而空间复杂度则是递归栈的大小,即O(logn)。代码如下:public ArrayListInteger> postorderTraversal(TreeNode root) { ArrayListInteger> res = new ArrayLi

2014-04-15 17:49:19 677

原创 Evaluate Reverse Polish Notation & LeetCode 02

Evaluate Reverse Polis

2014-04-14 22:18:08 451

转载 两种创建String对象的区别

创建String对象,我们可以用两种方式:    1, String s = new String("Victory");2,       String s = "Victory";那么这两种方式的区别是?先看一个程序:String     s1,s2; s1=new     String("we     are     students"); s2=new

2014-04-14 17:14:27 690

空空如也

空空如也

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

TA关注的人

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