摘要: Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. 思路1:现将左右 阅读全文
posted @ 2017-02-26 03:35 lettuan 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思路:参考:http://www.cnblogs.com/zuoyuan/p/3772372.html 阅读全文
posted @ 2017-02-26 01:39 lettuan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 思路:先建立一个对应的dict。注意转换规则中的特例,比如XL (=50-10), 阅读全文
posted @ 2017-02-26 01:15 lettuan 阅读(121) 评论(0) 推荐(0) 编辑