Jim TsengFunction & Methods|How to Write “Good Code”?Minimize the number of parametersJun 20, 2023Jun 20, 2023
Jim TsengCode Structure, Comments, and Formatting|How to Write “Good Code”?Bad commentsJun 9, 2023Jun 9, 2023
Jim TsengMinimum spanning tree — Prim’s AlgorithmPrim’s algorithm is a greedy algorithm used to find the minimum spanning tree (MST). The minimum spanning tree is a subset of the graph’s…May 31, 2023May 31, 2023
Jim TsengAll-Pairs Shortest Path — Floyd-Warshall AlgorithmThe Floyd-Warshall algorithm is a dynamic programming algorithm used to find the shortest paths between all pairs of vertices in a…May 29, 2023May 29, 2023
Jim TsengSingle source shortest path — Breadth-First SearchThe Breadth-First Search (BFS) algorithm can be used to find the shortest path between two vertices in an unweighted graph. It explores…May 29, 2023May 29, 2023
Jim TsengFind the shortest path — Bellman-Ford AlgorithmThe Bellman-Ford algorithm is an algorithm used to find the shortest paths from a single source vertex to all other vertices in a weighted…May 29, 2023May 29, 2023
Jim TsengFind the shortest path — Dijkstra’s AlgorithmThe algorithm works with weighted graphs, where each edge has an associated weight or cost. It aims to find the minimum total weight path…May 28, 2023May 28, 2023
Jim TsengGraph Traversals - BFS & DFSIn computer science, BFS and DFS are two commonly used algorithms for traversing or searching through graph-like data structures, such as…May 25, 2023May 25, 2023