{"id":19979198,"url":"https://github.com/shellfly/algs4-py","last_synced_at":"2025-04-05T01:09:23.586Z","repository":{"id":49457874,"uuid":"114614712","full_name":"shellfly/algs4-py","owner":"shellfly","description":"A Python library for the textbook Algorithms, 4th edition","archived":false,"fork":false,"pushed_at":"2022-09-26T06:26:16.000Z","size":97,"stargazers_count":294,"open_issues_count":2,"forks_count":78,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T00:07:53.919Z","etag":null,"topics":["algorithm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-18T08:23:13.000Z","updated_at":"2025-03-11T12:43:25.000Z","dependencies_parsed_at":"2022-07-30T16:08:49.653Z","dependency_job_id":null,"html_url":"https://github.com/shellfly/algs4-py","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgs4-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgs4-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgs4-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellfly%2Falgs4-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellfly","download_url":"https://codeload.github.com/shellfly/algs4-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271532,"owners_count":20911587,"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","python"],"created_at":"2024-11-13T03:37:08.447Z","updated_at":"2025-04-05T01:09:23.569Z","avatar_url":"https://github.com/shellfly.png","language":"Python","readme":"[![PyPI version](https://badge.fury.io/py/algs4.svg)](https://badge.fury.io/py/algs4)\n\n## Overview\n\nThis repository contains the Python 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 Python implementation of the library so that a Python programmer can follow this book easily or prefer to demonstrate the algorithms using Python.\n\nTry to keep the interface and variable name consistent with the original book while writing idiomatic Python code.\n\n## Install\n\n```sh\npip install algs4\n```\n\n```python\nfrom algs4.stack import Stack\n```\n\n## Index\n\n* 1 FUNDAMENTALS\n\n  * [Bag](algs4/bag.py)\n  * [Queue](algs4/queue.py)\n  * [Stack](algs4/stack.py)\n  * [UnionFind](algs4/uf.py)\n\n* 2 SORTING\n\n  * [Selection](algs4/selection.py)\n  * [Insertion](algs4/insertion.py)\n  * [Shell](algs4/shell.py)\n  * [Merge](algs4/merge.py)\n  * [Quick](algs4/quick.py)\n  * [Quick3Way](algs4/quick_3way.py)\n  * [MaxPQ](algs4/max_pq.py)\n  * [TopM](algs4/top_m.py)\n  * [IndexMinPQ](algs4/index_min_pq.py)\n  * [Multiway](algs4/multiway.py)\n  * [Heap](algs4/heap.py)\n\n* 3 SEARCHING\n\n  * [FrequencyCounter](algs4/frequency_counter.py)\n  * [SequentialSearchST](algs4/sequential_search_st.py)\n  * [BinarySearchST](algs4/binary_search_st.py)\n  * [BST](algs4/bst.py)\n  * [RedBlackBST](algs4/red_black_bst.py)\n  * [SeparateChainingHashST](algs4/separate_chaining_hash_st.py)\n  * [LinearProbingHashST](algs4/linear_probing_hash_st.py)\n\n* 4 GRAPHS\n  * Graph\n    * [Graph](algs4/graph.py)\n    * [DepthFirstSearch](algs4/depth_first_search.py)\n    * [DepthFirstPaths](algs4/depth_first_paths.py)\n    * [BreadthFirstPaths](algs4/breadth_first_paths.py)\n    * [CC](algs4/cc.py)\n    * [Cycle](algs4/cycle.py)\n    * [SymbolGraph](algs4/symbol_graph.py)\n    * [DegreesOfSeparation](algs4/degrees_of_separation.py)\n  * Digraph\n    * [Digraph](algs4/digraph.py)\n    * [DirectedDFS](algs4/directed_dfs.py)\n    * [DirectedCycle](algs4/directed_cycle.py)\n    * [DepthFirstOrder](algs4/depth_first_order.py)\n    * [Topological](algs4/topological.py)\n    * [KosarajuSCC](algs4/kosaraju_scc.py)\n  * MST\n    * [EdgeWeightedGraph](algs4/edge_weighted_graph.py)\n    * [LazyPrimMST](algs4/lazy_prim_mst.py)\n    * [PrimMST](algs4/prim_mst.py)\n    * [KruskalMST](algs4/kruskal_mst.py)\n  * Shortest Paths\n    * [EdgeWeightedDigraph](algs4/edge_weighted_digraph.py)\n    * [DijkstraSP](algs4/dijkstra_sp.py)\n    * [AcyclicSP](algs4/acyclic_sp.py)\n    * [BellmanFordSP](algs4/bellman_ford_sp.py)\n\n* 5 STRING\n  * [LSD](algs4/lsd.py)\n  * [MSD](algs4/msd.py)\n  * [Quick3string](algs4/quick3_string.py)\n  * [TrieST](algs4/trie_st.py)\n  * [TST](algs4/tst.py)\n  * [KMP](algs4/kmp.py)\n  * [NFA](algs4/nfa.py)\n  * [Huffman](algs4/huffman.py)\n  * [LZW](algs4/lzw.py)\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\ncode.\n\n[contributing guide](contributing.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellfly%2Falgs4-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellfly%2Falgs4-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellfly%2Falgs4-py/lists"}