随笔分类 -  Graph

摘要:131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome 阅读全文
posted @ 2016-03-06 07:00 新一代的天皇巨星 阅读(234) 评论(0) 推荐(0)
摘要:G(V,E,W), E~O(V^2) for complete graphOrder of graph: VSize of graph: EComplete graph: has one edge between each pair of vertices.Simple graph: has at ... 阅读全文
posted @ 2015-01-09 01:03 新一代的天皇巨星 阅读(161) 评论(0) 推荐(0)
摘要:public class Graph{ public void dfs(Vertex u) { u.visit(); u.visited = true; for(each v such that (u,v) belongs E) { if(!v.visited)... 阅读全文
posted @ 2014-12-28 10:07 新一代的天皇巨星 阅读(149) 评论(0) 推荐(0)