摘要: Course Schedule IITotal Accepted:13015Total Submissions:64067Difficulty:MediumThere are a total ofncourses you have to take, labeled from0ton - 1.Some... 阅读全文
posted @ 2015-10-23 23:14 流白 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Given a Directed Graph and two vertices in it, check whether there is a path from the first given vertex to second.For example, in the following graph... 阅读全文
posted @ 2015-10-23 19:48 流白 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 1 struct edge{ 2 int to,cost; 3 edge(){ this->to = 0; this->cost = 0;} 4 edge(int t){ this->to = t; this->cost = 0;} 5 }; 6 class Solutio... 阅读全文
posted @ 2015-10-23 19:15 流白 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public: 3 int uniquePathsWithObstacles(vector>& obstacleGrid) { 4 if(obstacleGrid.size()==0 || obstacleGrid[0].size(... 阅读全文
posted @ 2015-10-23 14:53 流白 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int maxn = 10; 8 struct edge{ 9 int to, cost;10 edge(in... 阅读全文
posted @ 2015-10-23 11:05 流白 阅读(306) 评论(0) 推荐(0) 编辑