摘要: Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2015-08-31 22:39 胡潇 阅读(577) 评论(0) 推荐(0) 编辑
摘要: Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially... 阅读全文
posted @ 2015-08-31 22:23 胡潇 阅读(617) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2015-08-31 10:40 胡潇 阅读(572) 评论(0) 推荐(0) 编辑