摘要:
Merge IntervalsGiven 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]... 阅读全文
摘要:
Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals... 阅读全文
摘要:
Length of Last WordGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.I... 阅读全文
摘要:
Spiral Matrix IIGiven an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the... 阅读全文
摘要:
Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[... 阅读全文