摘要: 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)
摘要: Bucket Sort:Scenario:Work when keys are in a small range.Linked List.Algorithm(Stable):1. Walk through each item and enqueue each item into its approp... 阅读全文
posted @ 2014-12-28 05:24 新一代的天皇巨星 阅读(217) 评论(0) 推荐(0)
摘要: Quick sort is empirically fastest among all the O(nlogn) sorting algorithms.Time Complexity:Best, Average, T(n) = 2T(n/2) + O(n) => O(nlogn)Worst case... 阅读全文
posted @ 2014-12-28 03:51 新一代的天皇巨星 阅读(188) 评论(0) 推荐(0)