摘要: 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-05-08 20:34 一弦一仙 阅读(158) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4... 阅读全文
posted @ 2014-05-08 20:14 一弦一仙 阅读(147) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/climbing-stairs/You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or ... 阅读全文
posted @ 2014-05-08 20:08 一弦一仙 阅读(177) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/maximum-subarray/Find the contiguous subarray within an array (containing at least one number) which has the largest s... 阅读全文
posted @ 2014-05-08 19:26 一弦一仙 阅读(183) 评论(0) 推荐(0) 编辑