菱纱梦

导航

2014年9月3日 #

Unique paths <leetcode>

摘要: A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文

posted @ 2014-09-03 16:57 菱纱梦 阅读(133) 评论(0) 推荐(0) 编辑

Plus One

摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文

posted @ 2014-09-03 16:26 菱纱梦 阅读(235) 评论(0) 推荐(0) 编辑

Pascal's Triangle <LeetCode>

摘要: Pascal's TriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,... 阅读全文

posted @ 2014-09-03 16:02 菱纱梦 阅读(134) 评论(0) 推荐(0) 编辑

Sort Colors <LeetCode>

摘要: Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the or... 阅读全文

posted @ 2014-09-03 15:58 菱纱梦 阅读(138) 评论(0) 推荐(0) 编辑

Merge Sorted Array <leetcode>

摘要: Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal... 阅读全文

posted @ 2014-09-03 10:42 菱纱梦 阅读(120) 评论(0) 推荐(0) 编辑

Symmetric Tree <LeetCode>

摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文

posted @ 2014-09-03 09:41 菱纱梦 阅读(145) 评论(0) 推荐(0) 编辑

2014年9月1日 #

一只年轻而倒悬的梨

摘要: 在一个女孩与一个女孩之间,我有极短暂的休息时间。 在这短暂的几分钟里,我往往会坐在窗前的白色椅子上,看楼下结满了野梨子的大树。果实起初是青灰色,味道很涩,后来渐渐变大而饱满,但果肉仍然极酸。多年来大树没有给过我哪怕一次惊喜;就像那些女孩子一样,它使我忧伤。 我是一名女子医院的外科医生,我的工作是... 阅读全文

posted @ 2014-09-01 11:46 菱纱梦 阅读(413) 评论(0) 推荐(0) 编辑

2014年8月31日 #

Merge Two Sorted Lists <LeetCode>

摘要: ---恢复内容开始---Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lis... 阅读全文

posted @ 2014-08-31 15:46 菱纱梦 阅读(156) 评论(0) 推荐(0) 编辑

Maximum Subarray <LeetCode>

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,... 阅读全文

posted @ 2014-08-31 15:04 菱纱梦 阅读(130) 评论(0) 推荐(0) 编辑

Single Number II <LeetCode>

摘要: Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp... 阅读全文

posted @ 2014-08-31 13:52 菱纱梦 阅读(129) 评论(0) 推荐(0) 编辑