摘要:
Sorting solution O(nlogn): 1 class Solution { 2 public: 3 int maximumGap(vector &num) { 4 int len = num.size(), result = 0; 5 if (... 阅读全文
posted @ 2015-03-21 05:47
keepshuatishuati
阅读(130)
评论(0)
推荐(0)
摘要:
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i... 阅读全文
posted @ 2015-03-21 05:00
keepshuatishuati
阅读(93)
评论(0)
推荐(0)
摘要:
This is the extension of Largest Rectangle in Histogram. We can just project 2D matrix to 1D array and compute it line by line. 1 class Solution { 2 p... 阅读全文
posted @ 2015-03-21 04:58
keepshuatishuati
阅读(140)
评论(0)
推荐(0)
浙公网安备 33010602011771号