摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文
posted @ 2014-09-06 23:52 山是水的故事 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 递归算法bool valid(vector &res, int r) { int nCol = res.size(); for(int i=0;i res, int &nCount) { if (l == n) { ... 阅读全文
posted @ 2014-09-06 22:27 山是水的故事 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2014-09-06 16:27 山是水的故事 阅读(185) 评论(0) 推荐(0) 编辑