摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2014-10-30 23:34 birdhack 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings.找出所有字符串的最长公共前缀。 1 public class Solution { 2 public String lo... 阅读全文
posted @ 2014-10-30 18:35 birdhack 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo... 阅读全文
posted @ 2014-10-30 00:35 birdhack 阅读(121) 评论(0) 推荐(0) 编辑