会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
canexjtuzju
记录
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2014年8月27日
LeetCode--Insert Interval
摘要: 其实可以O(n)的思路,如下 1 class Solution { 2 public: 3 vector insert(vector &intervals, Interval newInterval) { 4 // Start typing your C/C++ soluti...
阅读全文
posted @ 2014-08-27 21:41 canexjtuzju
阅读(209)
评论(0)
推荐(0)
编辑
LeetCode--Surrounded Regions
摘要: 1 class Solution { 2 public: 3 void solve(vector> &board) { 4 int m = board.size(); 5 if(m == 0) 6 return; 7 ...
阅读全文
posted @ 2014-08-27 21:06 canexjtuzju
阅读(160)
评论(0)
推荐(0)
编辑
LeetCode--Container With Most Water
摘要: 双指针 1 class Solution { 2 public: 3 int maxArea(vector &height) { 4 if(height.size() == 0 || height.size() == 1) 5 return 0; 6 ...
阅读全文
posted @ 2014-08-27 09:51 canexjtuzju
阅读(133)
评论(0)
推荐(0)
编辑