{"id":13417857,"url":"https://github.com/xtaci/algorithms","last_synced_at":"2025-05-14T05:10:39.210Z","repository":{"id":7933117,"uuid":"9322866","full_name":"xtaci/algorithms","owner":"xtaci","description":"Algorithms \u0026 Data structures in C++.","archived":false,"fork":false,"pushed_at":"2024-08-01T09:49:56.000Z","size":2268,"stargazers_count":5322,"open_issues_count":104,"forks_count":1521,"subscribers_count":366,"default_branch":"master","last_synced_at":"2025-04-09T02:15:11.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/xtaci.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-09T14:17:24.000Z","updated_at":"2025-04-08T12:04:28.000Z","dependencies_parsed_at":"2024-02-16T05:34:40.475Z","dependency_job_id":"50bf9646-4e65-4310-a3cd-56efa6afc3e1","html_url":"https://github.com/xtaci/algorithms","commit_stats":{"total_commits":430,"total_committers":30,"mean_commits":"14.333333333333334","dds":0.3395348837209302,"last_synced_commit":"cd540cfef27a25ed0f39acfaa45a2d92e5222450"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtaci%2Falgorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtaci%2Falgorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtaci%2Falgorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtaci%2Falgorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtaci","download_url":"https://codeload.github.com/xtaci/algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"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":[],"created_at":"2024-07-30T22:00:54.159Z","updated_at":"2025-05-14T05:10:39.180Z","avatar_url":"https://github.com/xtaci.png","language":"C++","readme":"### Algorithms \u0026 Data Structures in C++\n\n[![Build Status][1]][2]\n\n[1]: https://img.shields.io/github/created-at/xtaci/algorithms\n[2]: https://img.shields.io/github/created-at/xtaci/algorithms\n\n#### 目标 ( goal ) :\n\n   1. 经典的算法实现      \n      (classical algorithms implementations)      \n   2. 服务器端       \n      (based on linux/gcc)       \n   3. 正确，易于使用和改造, 一个头文件一个算法，并附带一个demo.       \n      (correct! and ease of use, one .header file per algorithm)        \n\n#### 约定 ( Convention ):\n\n   1.  一个算法用一个.h文件表示放到include下. ( one .header file per algorithm. )\n   2.  算法演示的demo程序放到src下.  ( one demo per algorithm.  )\n   3.  程序正确通过后，请发起Pull Requests，代码被验证后入库，并在README中发布新算法实现。\n       (Please Use Fork+Pull Requests !!! Correctness is the most important!)\n   4.  TAB = 4 space.  set ts=4 in vim\n   5.  Graph的输出格式为 [Graphviz](http://www.graphviz.org/) Dot格式.\n   \t(the output format of the graph is in dot of graphviz.)\n   \teg:\n   \t![demograph](demo_graph.png)\n\n#### 已实现 ( Implemented ):\n\n| Name | File |\n|------|------|\n|Array shuffle|https://github.com/xtaci/algorithms/blob/master/include/shuffle.h |\n|Prime test(trial division)|https://github.com/xtaci/algorithms/blob/master/include/prime.h|\n|Prime test(Miller-Rabin's method)|https://github.com/xtaci/algorithms/blob/master/include/prime.h|\n|2D Array|https://github.com/xtaci/algorithms/blob/master/include/2darray.h|\n|Arbitrary Integer|https://github.com/xtaci/algorithms/blob/master/include/integer.h|\n|Linear congruential generator|https://github.com/xtaci/algorithms/blob/master/include/random.h|\n|Maximum subarray problem|https://github.com/xtaci/algorithms/blob/master/include/max_subarray.h|\n|Bit-Set|https://github.com/xtaci/algorithms/blob/master/include/bitset.h|\n|Queue|https://github.com/xtaci/algorithms/blob/master/include/queue.h|\n|Stack|https://github.com/xtaci/algorithms/blob/master/include/stack.h|\n|Binary Heap|https://github.com/xtaci/algorithms/blob/master/include/heap.h|\n|Fibonacci Heap|https://github.com/xtaci/algorithms/blob/master/include/fib-heap.h|\n|Priority Queue (list based)|https://github.com/xtaci/algorithms/blob/master/include/priority_queue.h|\n|Bubble sort|https://github.com/xtaci/algorithms/blob/master/include/bubble_sort.h|\n|Selection sort|https://github.com/xtaci/algorithms/blob/master/include/selection_sort.h|\n|Insertion sort|https://github.com/xtaci/algorithms/blob/master/include/insertion_sort.h|\n|Shell sort|https://github.com/xtaci/algorithms/blob/master/include/shell_sort.h|\n|Radix sort|https://github.com/xtaci/algorithms/blob/master/include/radix_sort.h|\n|Quicksort|https://github.com/xtaci/algorithms/blob/master/include/quick_sort.h|\n|Merge sort|https://github.com/xtaci/algorithms/blob/master/include/merge_sort.h|\n|Double linked list|https://github.com/xtaci/algorithms/blob/master/include/double_linked_list.h|\n|Skip list|https://github.com/xtaci/algorithms/blob/master/include/skiplist.h|\n|Largest common sequence|https://github.com/xtaci/algorithms/blob/master/include/lcs.h|\n|Binary search tree|https://github.com/xtaci/algorithms/blob/master/include/binary_search_tree.h|\n|AVL tree|https://github.com/xtaci/algorithms/blob/master/include/avl.h|\n|Dynamic order statistics|https://github.com/xtaci/algorithms/blob/master/include/dos_tree.h|\n|Red-black tree|https://github.com/xtaci/algorithms/blob/master/include/rbtree.h|\n|Interval tree|https://github.com/xtaci/algorithms/blob/master/include/interval_tree.h|\n|Prefix Tree(Trie)|https://github.com/xtaci/algorithms/blob/master/include/trie.h|\n|Suffix Tree|https://github.com/xtaci/algorithms/blob/master/include/suffix_tree.h|\n|B-Tree|https://github.com/xtaci/algorithms/blob/master/include/btree.h|\n|Suffix Array|https://github.com/xtaci/algorithms/blob/master/include/suffix_array.h|\n|Hash by multiplication|https://github.com/xtaci/algorithms/blob/master/include/hash_multi.h|\n|Hash table|https://github.com/xtaci/algorithms/blob/master/include/hash_table.h|\n|Universal hash function|https://github.com/xtaci/algorithms/blob/master/include/universal_hash.h|\n|Perfect hash|https://github.com/xtaci/algorithms/blob/master/include/perfect_hash.h|\n|Java's string hash|https://github.com/xtaci/algorithms/blob/master/include/hash_string.h|\n|FNV-1a string hash|https://github.com/xtaci/algorithms/blob/master/include/hash_string.h|\n|SimHash|https://github.com/xtaci/algorithms/blob/master/include/simhash.h|\n|Bloom Filter|https://github.com/xtaci/algorithms/blob/master/include/bloom_filter.h|\n|SHA-1 Message Digest Algorithm|https://github.com/xtaci/algorithms/blob/master/include/sha1.h|\n|MD5|https://github.com/xtaci/algorithms/blob/master/include/md5.h|\n|Base64|https://github.com/xtaci/algorithms/blob/master/include/base64.h|\n|Strongly Connected Components(SCC)|https://github.com/xtaci/algorithms/blob/master/include/scc.h|\n|Prim's minimum spanning tree|https://github.com/xtaci/algorithms/blob/master/include/prim_mst.h|\n|Kruskal MST|https://github.com/xtaci/algorithms/blob/master/include/kruskal_mst.h|\n|Breadth First Search|https://github.com/xtaci/algorithms/blob/master/include/graph_search.h|\n|Depth First Search|https://github.com/xtaci/algorithms/blob/master/include/graph_search.h|\n|Dijkstra's algorithm|https://github.com/xtaci/algorithms/blob/master/include/dijkstra.h|\n|Bellman-Ford algorithm|https://github.com/xtaci/algorithms/blob/master/include/bellman_ford.h|\n|Edmonds-Karp Maximal Flow|https://github.com/xtaci/algorithms/blob/master/include/edmonds_karp.h|\n|Push–Relabel algorithm|https://github.com/xtaci/algorithms/blob/master/include/relabel_to_front.h|\n|Huffman Coding|https://github.com/xtaci/algorithms/blob/master/include/huffman.h|\n|Word segementation|https://github.com/xtaci/algorithms/blob/master/include/word_seg.h|\n|A\\* algorithm|https://github.com/xtaci/algorithms/blob/master/include/astar.h|\n|K-Means|https://github.com/xtaci/algorithms/blob/master/include/k-means.h|\n|Knuth–Morris–Pratt algorithm|https://github.com/xtaci/algorithms/blob/master/include/kmp.h|\n|Disjoint-Set|https://github.com/xtaci/algorithms/blob/master/include/disjoint-set.h|\n|8-Queen Problem|https://github.com/xtaci/algorithms/blob/master/include/8queen.h|\n|Palindrome|https://github.com/xtaci/algorithms/blob/master/include/palindrome.h|\n|LCA using Binary Lifting|https://github.com/xtaci/algorithms/blob/master/include/LCA.h|\n\n#### 贡献者 ( Contributors ) :  \n    Samana:  for heavy work of MSVC compatability\n    wycg1984: for K-Means\n    xmuliang: for HeapSort, Kruskal MST\n    wyh267: for base64, LRU, bubble sort, selection sort\n    ZhangYou0122: Push-Relabel algorithm, Suffix Tree           \n    UsingtcNower: Suffix Array\n    afernandez90: AVL trees\n","funding_links":[],"categories":["TODO scan for Android support in followings","C++","Other Awesome Projects","Coding","计算机编程 数据结构与算法","其它Awesome项目","Github Libraries","Github 仓库"],"sub_categories":["C++ Data Structures and Algorithms","网络服务_其他","C++"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtaci%2Falgorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtaci%2Falgorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtaci%2Falgorithms/lists"}