leetcode
文章平均质量分 78
samnancy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Search for a Range @leetcode
leetcode原题的地址链接:https://oj.leetcode.com/problems/search-for-a-range/ 题目内容如下: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runt原创 2015-01-22 15:03:51 · 484 阅读 · 0 评论 -
Count and Say@leetcode
leetcode原题的地址链接:https://oj.leetcode.com/problems/count-and-say/ 题目内容如下: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is rea原创 2015-01-27 17:30:35 · 459 阅读 · 0 评论 -
Binary Tree Inorder Traversal @ LeetCode
看了好久的维基百科关于二叉树的解说、csdn相关博文的理解,及stone老师的帮忙下,终于写出能够打印出结果的完整程序啦。本文递归相关代码来自http://blog.youkuaiyun.com/linhuanmars/article/details/20187257 支持原创。其它部分是自己在stone老师的帮忙下理解后完整调试出的。 先贴leetcode的原题链接地址:https://oj.le原创 2015-01-13 15:26:16 · 678 阅读 · 0 评论 -
Binary Tree Preorder Traversal @leetcode
在二叉树方面停留了好长一段时间,各种资料:维基百科的定义、csdn的博客,java的api使用方法视频,最近突然发现我对数据结构的理解似乎开始有点质变的现象啦,开始能自己写出完整正确的代码啦,欣喜中,再接再厉,为自己加油!今天来贴一段二叉树递归实现先序遍历的完整代码。 leetcode原题地址:https://oj.leetcode.com/problems/binary-tree-原创 2015-01-16 14:34:10 · 598 阅读 · 0 评论 -
Binary Tree Postorder Traversal @leetcode
leetcode 原题地址:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/ 后序遍历思想:访问左孩子--》访问右孩子--》访问根节点 递归思想的完整代码如下: package tree; import java.util.ArrayList; public class Postorder_trav原创 2015-01-16 15:54:46 · 486 阅读 · 0 评论 -
Search insert position @leetcode
leetcode原题地址:https://oj.leetcode.com/problems/search-insert-position/ 原题内容如下: Given a sorted array and a target value, return the index if the target is found. If not, return the index wher原创 2015-01-21 06:23:32 · 558 阅读 · 0 评论
分享