{"id":19979216,"url":"https://github.com/shellfly/algo","last_synced_at":"2025-05-04T04:32:41.157Z","repository":{"id":52917598,"uuid":"190998359","full_name":"shellfly/algo","owner":"shellfly","description":"A Golang library for the textbook Algorithms, 4th edition","archived":false,"fork":false,"pushed_at":"2021-09-09T13:03:43.000Z","size":155,"stargazers_count":178,"open_issues_count":0,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-20T10:17:06.942Z","etag":null,"topics":["algorithm","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shellfly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-09T11:31:27.000Z","updated_at":"2024-04-30T09:10:03.000Z","dependencies_parsed_at":"2022-08-23T15:02:29.660Z","dependency_job_id":null,"html_url":"https://github.com/shellfly/algo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellfly","download_url":"https://codeload.github.com/shellfly/algo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224385199,"owners_count":17302442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","golang"],"created_at":"2024-11-13T03:37:08.963Z","updated_at":"2024-11-13T03:37:10.390Z","avatar_url":"https://github.com/shellfly.png","language":"Go","readme":"## Overview\n\nThis repository contains the Go source code for the algorithms in the textbook\n\u003ca href = \"http://amzn.to/13VNJi7\"\u003eAlgorithms, 4th Edition\u003c/a\u003e by Robert Sedgewick and Kevin Wayne.\n\nThe official Java source code is \u003ca href=\"https://github.com/kevin-wayne/algs4\"\u003ehere\u003c/a\u003e.\n\n## Goals\n\nMake a Go implementation of the library so that a Go programmer can follow this book easily or prefer to demonstrate the algorithms using Go.\n\nTry to keep the interface and variable name consistent with the original book while writing idiomatic go code.\n\n## Note\n\nUnlike Java or Python where you can put `main` function in a file directly. In `go` the `main` function has to be in the `main` package and in the **cmd** directory by convention.\nTo test each algorithm(data structure), instead of running the file directly, you have to run the file under **cmd** directory. Example: [cmd/bag/main.go](cmd/bag/main.go)\n\n## Index\n\n* 1 FUNDAMENTALS\n  * [Bag](algs4/bag.go)\n  * [Queue](algs4/queue.go)\n  * [Stack](algs4/stack.go)\n  * [UnionFind](algs4/uf.go)\n* 2 SORTING\n  * [Selection](algs4/selection.go)\n  * [Insertion](algs4/insertion.go)\n  * [Shell](algs4/shell.go)\n  * [Merge](algs4/merge.go)\n  * [Quick](algs4/quick.go)\n  * [Quick3Way](algs4/quick_3way.go)\n  * [MaxPQ](algs4/max_pq.go)\n  * [TopM](cmd/topm/main.go)\n  * [IndexMinPQ](algs4/index_min_pq.go)\n  * [Multiway](cmd/multiway/main.go)\n  * [Heap](algs4/heap.go)\n* 3 SEARCHING\n  * [FrequencyCounter](cmd/frequency-counter/main.go)\n  * [SequentialSearchST](algs4/sequential_search.go)\n  * [BinarySearchST](algs4/binary_search_st.go)\n  * [BST](algs4/bst.go)\n  * [RedBlackBST](algs4/red_black_bst.go)\n  * [SeparateChainingHashST](algs4/separate_chaining_hash_st.go)\n  * [LinearProbingHashST](algs4/linear_probing_hash_st.go)\n* 4 GRAPHS\n  * Graph\n    * [Graph](algs4/graph.go)\n    * [DepthFirstSearch](algs4/depth_first_search.go)\n    * [DepthFirstPaths](algs4/depth_first_paths.go)\n    * [BreadthFirstPaths](algs4/breadth_first_paths.go)\n    * [CC](algs4/cc.go)\n    * [Cycle](algs4/cycle.go)\n    * [SymbolGraph](algs4/symbol_graph.go)\n    * [DegreesOfSeparation](cmd/degrees-of-separation/main.go)\n  * Digraph\n    * [Digraph](algs4/digraph.go)\n    * [SymbolDigraph](algs4/symbol_digraph.go)\n    * [DirectedDFS](algs4/directed_dfs.go)\n    * [DirectedCycle](algs4/directed_cycle.go)\n    * [DepthFirstOrder](algs4/depth_first_order.go)\n    * [Topological](algs4/topological.go)\n    * [KosarajuSCC](algs4/kosaraju_scc.go)\n  * MST\n    * [EdgeWeightedGraph](algs4/edge_weighted_graph.go)\n    * [LazyPrimMST](algs4/lazy_prim_mst.go)\n    * [PrimMST](algs4/prim_mst.go)\n    * [KruskalMST](algs4/kruskal_mst.go)\n  * Shortest Paths\n    * [EdgeWeightedDigraph](algs4/edge_weighted_digraph.go)\n    * [DijkstraSP](algs4/dijkstra_sp.go)\n    * [AcyclicSP](algs4/acyclic_sp.go)\n    * [BellmanFordSP](algs4/bellman_ford_sp.go)\n* 5 STRING\n  * [LSD](algs4/lsd.go)\n  * [MSD](algs4/msd.go)\n  * [Quick3string](algs4/quick3_string.go)\n  * [TrieST](algs4/trie_st.go)\n  * [TST](algs4/tst.go)\n  * [KMP](algs4/kmp.go)\n  * [NFA](algs4/nfa.go)\n  * [Huffman](algs4/huffman.go)\n  * [LZW](algs4/lzw.go)\n\n\n## License\n\nThis code is released under MIT.\n\n## Contribute to this repository\n\nIssue reports and code fixes are welcome. please follow the same style as the code in the repository and add test for your code.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellfly%2Falgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellfly%2Falgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellfly%2Falgo/lists"}