Chinaunix首页 | 论坛 | 博客
  • 博客访问: 73689
  • 博文数量: 16
  • 博客积分: 31
  • 博客等级: 民兵
  • 技术积分: 187
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-19 19:58
个人简介

一步一个阶梯,向人类进化。

文章分类

全部博文(16)

文章存档

2018年(1)

2015年(3)

2014年(11)

2013年(1)

我的朋友

发布时间:2014-12-29 16:19:55

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a c.........【阅读全文】

阅读(1531) | 评论(0) | 转发(0)

发布时间:2014-12-29 15:54:09

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.For example,Given input array A = [1,1,2],Your function s.........【阅读全文】

阅读(881) | 评论(0) | 转发(0)

发布时间:2014-12-29 15:41:43

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.题目很简单,但考的很基础。二叉树的遍历方式有两种:递归和非递归,本题也有两种解法。计算二叉树的深度,简单的前序遍历即可。递归算法:.........【阅读全文】

阅读(1855) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册