摘要:
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: AC code: Runtime: 0 ms, faster than 1 阅读全文
摘要:
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文
摘要:
Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: AC code: 阅读全文
摘要:
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
摘要:
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文