[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6039":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":5,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":43,"readmeContent":44,"aiSummary":45,"trendingCount":15,"starSnapshotCount":15,"syncStatus":46,"lastSyncTime":47,"discoverSource":48},6039,"C","TheAlgorithms\u002FC","TheAlgorithms","Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.","https:\u002F\u002Fthealgorithms.github.io\u002FC",null,22142,4760,526,4,0,22,120,99,"GNU General Public License v3.0",false,"master",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"algorithm-challenges","algorithm-competitions","algorithms","c","community-driven","computer-science","data-structures","datastructures","education","educational","hacktoberfest","interview","interview-questions","learn-to-code","machine-learning","machine-learning-algorithms","mathematics","search","sort","2026-06-12 04:00:27","# The Algorithms - C # {#mainpage}\n\u003C!-- the suffix in the above line is required for doxygen to consider this as the index page of the generated documentation site -->\n\n[![Gitpod Ready-to-Code](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitpod-Ready--to--Code-blue?logo=gitpod)](https:\u002F\u002Fgitpod.io\u002F#https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC)\n[![CodeQL CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Factions\u002Fworkflows\u002Fcodeql.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Factions\u002Fworkflows\u002Fcodeql_analysis.yml)\n[![Gitter chat](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FChat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square)](https:\u002F\u002Fgitter.im\u002FTheAlgorithms)\n[![contributions welcome](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n![GitHub repo size](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002FTheAlgorithms\u002FC?color=red&style=flat-square)\n[![Doxygen CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fworkflows\u002FDoxygen%20CI\u002Fbadge.svg)](https:\u002F\u002FTheAlgorithms.github.io\u002FC)\n[![Awesome CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fworkflows\u002FAwesome%20CI%20Workflow\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Factions?query=workflow%3A%22Awesome+CI+Workflow%22)\n[![Income](https:\u002F\u002Fimg.shields.io\u002Fliberapay\u002Freceives\u002FTheAlgorithms.svg?logo=liberapay)](https:\u002F\u002Fliberapay.com\u002FTheAlgorithms)\n[![Discord chat](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F808045925556682782.svg?logo=discord&colorB=5865F2)](https:\u002F\u002Fthe-algorithms.com\u002Fdiscord\u002F)\n[![Donate](https:\u002F\u002Fliberapay.com\u002Fassets\u002Fwidgets\u002Fdonate.svg)](https:\u002F\u002Fliberapay.com\u002FTheAlgorithms\u002Fdonate)\n\n## Overview\n\nThe repository is a collection of open-source implementations of a variety of algorithms implemented in C and licensed under [GPLv3 License](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fblob\u002Fmaster\u002FLICENSE). The algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and their associated documentations are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using different algorithm strategies and optimizations.\n\n## Features\n\n* The repository provides implementations of various algorithms in one of the most fundamental general purpose languages - [C](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC_(programming_language)).\n* Well documented source code with detailed explanations provide a valuable resource for educators and students alike.\n* Each source code is atomic using standard C library [`libc`](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC_standard_library) and _no external libraries_ are required for their compilation and execution. Thus the fundamentals of the algorithms can be studied in much depth.\n* Source codes are [compiled and tested](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Factions?query=workflow%3A%22Awesome+CI+Workflow%22) for every commit on the latest versions of two major operating systems viz., MacOS and Ubuntu (Linux) using AppleClang 14.0.0 and GNU 11.3.0 respectively.\n* Strict adherence to [C11](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC11_(C_standard_revision)) standard ensures portability of code to embedded systems as well like ESP32, ARM Cortex, etc. with little to no changes.\n* Self-checks within programs ensure correct implementations with confidence.\n* Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.\n\n## Documentation\n\n[Online Documentation](https:\u002F\u002FTheAlgorithms.github.io\u002FC) is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary.\nClick on [Files menu](https:\u002F\u002FTheAlgorithms.github.io\u002FC\u002Ffiles.html) to see the list of all the files documented with the code.\n\n[Documentation of Algorithms in C](https:\u002F\u002Fthealgorithms.github.io\u002FC) by [The Algorithms Contributors](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fgraphs\u002Fcontributors) is licensed under [CC BY-SA 4.0](https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\u002F?ref=chooser-v1)\u003Cbr\u002F>\n\u003Ca href=\"https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F4.0\">\u003Cimg alt=\"Creative Commons License\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https:\u002F\u002Fmirrors.creativecommons.org\u002Fpresskit\u002Ficons\u002Fcc.svg\" \u002F>\u003Cimg  alt=\"Credit must be given to the creator\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https:\u002F\u002Fmirrors.creativecommons.org\u002Fpresskit\u002Ficons\u002Fby.svg\" \u002F>\u003Cimg alt=\"Adaptations must be shared under the same terms\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https:\u002F\u002Fmirrors.creativecommons.org\u002Fpresskit\u002Ficons\u002Fsa.svg\" \u002F>\u003C\u002Fa>\n\n## Contributions\n\nAs a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our [Contribution Guidelines](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md).\n","TheAlgorithms\u002FC 是一个用 C 语言实现的算法集合，旨在为教育目的提供数学、机器学习、计算机科学等领域的算法示例。项目包含多种算法的核心功能实现，涵盖数据结构、搜索、排序等多个方面，并且每个算法都附有详细的文档说明，便于理解与学习。所有代码均使用标准 C 库编写，无需依赖外部库，这使得用户可以更专注于算法本身的逻辑和优化。适用于编程初学者学习算法基础，也适合教师作为教学资源使用，帮助学生通过实际编码加深对理论知识的理解。",2,"2026-06-11 03:05:28","top_language"]