Try not to become a man of success, but rather try to become a man of value. - Albert Einstein 不自见故明;不自是故彰;不自伐故有功;不自矜 故长。 夫唯不争,故天下莫能与之争。 Data Structure Review (C++ STL) : array(array), dynamic array (vector) doubly linked list (list), singly linked list (forward_list) stack, queue, priority_queue (heap structure) binary tree, binary search tree (BST) graph (adjacent list, adjacent matrix, edge list) union-find data structure A directed graph is strongly connected if there is a path between all pairs of vertices. https://en.wikipedia.org/wiki/Strongly_connected_component Kosaraju’s algorithm 1) Do DFS and push the vertex to stack S. For each vertex u of the graph, mark u as unvisited in visited[] array. Let Stack S be empty. For each vertex u of the graph do dfs(u, visited, S), where dfs() is the recursive subroutine: mark u as visited: ...
Comments
Post a Comment