摘要:
1 class Solution { 2 public: 3 vector > generateMatrix(int n) { 4 if (n == 0) return vector >(); 5 vector > res(n, vector(n)); 6... 阅读全文
摘要:
1 class Solution { 2 public: 3 vector spiralOrder(vector > &matrix) { 4 vector res; 5 if (matrix.empty() || matrix[0].empty()) re... 阅读全文
摘要:
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]. Solution... 阅读全文
摘要:
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have ... 阅读全文