[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-TheAlgorithms--C-Plus-Plus":3,"tool-TheAlgorithms--C-Plus-Plus":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":81,"owner_website":82,"owner_url":83,"languages":84,"stars":101,"forks":102,"last_commit_at":103,"license":104,"difficulty_score":105,"env_os":106,"env_gpu":107,"env_ram":107,"env_deps":108,"category_tags":114,"github_topics":115,"view_count":132,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":133,"updated_at":134,"faqs":135,"releases":136},3222,"TheAlgorithms\u002FC-Plus-Plus","C-Plus-Plus","Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.","C-Plus-Plus 是一个面向教育目的的开源算法集合，使用 C++ 语言实现了数学、机器学习、计算机科学及物理学领域的多种经典算法。它主要解决了学习者在寻找高质量、可运行且易于理解的算法参考代码时的痛点，避免了因依赖复杂外部库或文档缺失而导致的学习障碍。\n\n该项目非常适合计算机专业的学生、教育工作者以及希望夯实基础的开发者使用。无论是用于课堂演示、课后自学，还是作为嵌入式开发的参考素材，C-Plus-Plus 都能提供极大的便利。其核心亮点在于所有代码均基于 C++17 标准编写，仅依赖标准模板库（STL），无需安装任何第三方依赖即可在 Windows、macOS 和 Linux 等主流平台上编译运行。此外，项目拥有详尽的代码注释和自动生成的在线文档，并通过持续的自动化测试确保每段代码的正确性与跨平台兼容性。这种模块化且严谨的实现方式，让用户不仅能直接复用代码，更能深入探究算法背后的逻辑与优化策略，是掌握算法原理的理想资源库。","# The Algorithms - C++ # {#mainpage}\n\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-Plus-Plus)\n[![CodeQL CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions\u002Fworkflows\u002Fcodeql.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions\u002Fworkflows\u002Fcodeql.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-Plus-Plus\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n![GitHub repo size](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002FTheAlgorithms\u002FC-Plus-Plus?color=red&style=flat-square)\n[![Doxygen CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fworkflows\u002FDoxygen%20CI\u002Fbadge.svg)](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus)\n[![Awesome CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fworkflows\u002FAwesome%20CI%20Workflow\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\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\nThis repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under [MIT License](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fblob\u002Fmaster\u002FLICENSE). These algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and the associated documentation 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 a 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%2B%2B).\n- Well documented source code with detailed explanations provide a valuable resource for educators and students alike.\n- Each source code is atomic using [STL classes](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStandard_Template_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-Plus-Plus\u002Factions?query=workflow%3A%22Awesome+CI+Workflow%22) for every commit on the latest versions of three major operating systems viz., Windows, MacOS, and Ubuntu (Linux) using MSVC 19 2022, AppleClang 15.0.15, and GNU 13.3.0 respectively.\n- Strict adherence to [C++17](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC%2B%2B17) standard ensures portability of code to embedded systems as well like [ESP32](https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Fstable\u002Fesp32\u002Fapi-guides\u002Fcplusplus.html#c-language-standard), [ARM Cortex](https:\u002F\u002Fdeveloper.arm.com\u002Fdocumentation\u002F101458\u002F2404\u002FStandards-support\u002FSupported-C-C---standards-in-Arm-C-C---Compiler), 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-Plus-Plus) 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. The documentation also introduces interactive source code with links to documentation for C++ STL library functions used.\nClick on [Files menu](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus\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-Plus-Plus) by [The Algorithms Contributors](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\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-Plus-Plus\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md).\n","# 算法 - C++ # {#mainpage}\n\n\u003C!-- 上述行中的后缀是 Doxygen 将其视为生成文档站点索引页所必需的 -->\n\n[![Gitpod 准备就绪](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitpod-Ready--to--Code-blue?logo=gitpod)](https:\u002F\u002Fgitpod.io\u002F#https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus)\n[![CodeQL CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions\u002Fworkflows\u002Fcodeql.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions\u002Fworkflows\u002Fcodeql.yml)\n[![Gitter 聊天](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FChat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square)](https:\u002F\u002Fgitter.im\u002FTheAlgorithms)\n[![欢迎贡献](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n![GitHub 仓库大小](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002FTheAlgorithms\u002FC-Plus-Plus?color=red&style=flat-square)\n[![Doxygen CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fworkflows\u002FDoxygen%20CI\u002Fbadge.svg)](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus)\n[![Awesome CI](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fworkflows\u002FAwesome%20CI%20Workflow\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions?query=workflow%3A%22Awesome+CI+Workflow%22)\n[![收入](https:\u002F\u002Fimg.shields.io\u002Fliberapay\u002Freceives\u002FTheAlgorithms.svg?logo=liberapay)](https:\u002F\u002Fliberapay.com\u002FTheAlgorithms)\n[![Discord 聊天](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F808045925556682782.svg?logo=discord&colorB=5865F2)](https:\u002F\u002Fthe-algorithms.com\u002Fdiscord\u002F)\n[![捐赠](https:\u002F\u002Fliberapay.com\u002Fassets\u002Fwidgets\u002Fdonate.svg)](https:\u002F\u002Fliberapay.com\u002FTheAlgorithms\u002Fdonate)\n\n## 概述\n\n本仓库是一个开源项目，包含了用 C++ 实现的各种算法，并采用 [MIT 许可证](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fblob\u002Fmaster\u002FLICENSE) 进行授权。这些算法涵盖了计算机科学、数学与统计学、数据科学、机器学习、工程等多个领域。代码实现及其相关文档旨在为教育工作者和学生提供学习资源。因此，针对同一目标，可能会存在多种不同的实现方式，它们采用了不同的算法策略和优化技术。\n\n## 特性\n\n- 本仓库提供了使用最基础的通用编程语言之一——[C++](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC%2B%2B)——实现的各种算法。\n- 文档详尽的源代码为教育工作者和学生提供了宝贵的资源。\n- 每个源代码模块都基于 [STL 类](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStandard_Template_Library)，且无需任何外部库即可编译和运行，从而能够深入研究算法的基本原理。\n- 源代码会在每次提交时，分别在 Windows、MacOS 和 Ubuntu（Linux）三大主流操作系统上，使用 MSVC 19 2022、AppleClang 15.0.15 和 GNU 13.3.0 最新版本进行[编译和测试](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Factions?query=workflow%3A%22Awesome+CI+Workflow%22)。\n- 严格遵循 [C++17](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FC%2B%2B17) 标准，确保代码可以轻松移植到嵌入式系统中，如 [ESP32](https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Fstable\u002Fesp32\u002Fapi-guides\u002Fcplusplus.html#c-language-standard)、[ARM Cortex](https:\u002F\u002Fdeveloper.arm.com\u002Fdocumentation\u002F101458\u002F2404\u002FStandards-support\u002FSupported-C-C---standards-in-Arm-C-C---Compiler) 等，几乎无需修改。\n- 程序内部的自检机制确保了实现的正确性，增强了可靠性。\n- 模块化的实现方式和开源许可协议使得这些函数可以方便地集成到其他应用程序中。\n\n## 文档\n\n[在线文档](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus)直接由仓库源代码生成。文档包含所有资源，包括源代码片段、程序执行细节、程序流程图示以及必要的外部资源链接。此外，文档还提供了交互式的源代码，并附有对所使用的 C++ STL 库函数的详细说明链接。\n点击 [文件菜单](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus\u002Ffiles.html) 可查看所有已记录代码的文件列表。\n\n[用 C++ 实现的算法文档](https:\u002F\u002Fthealgorithms.github.io\u002FC-Plus-Plus)由 [The Algorithms 贡献者](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fgraphs\u002Fcontributors)编写，采用 [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=\"知识共享许可\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https:\u002F\u002Fmirrors.creativecommons.org\u002Fpresskit\u002Ficons\u002Fcc.svg\" \u002F>\u003Cimg  alt=\"必须注明原作者\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https:\u002F\u002Fmirrors.creativecommons.org\u002Fpresskit\u002Ficons\u002Fby.svg\" \u002F>\u003Cimg alt=\"衍生作品需以相同条款共享\" 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## 贡献\n\n作为社区驱动并维护的仓库，我们欢迎高质量、非剽窃的新贡献。请阅读我们的[贡献指南](https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)。","# C-Plus-Plus 算法库快速上手指南\n\n本仓库是 **The Algorithms** 组织的 C++ 版本，收录了涵盖计算机科学、数学、统计学、数据科学及机器学习等领域的多种开源算法实现。代码遵循 C++17 标准，无外部依赖，适合学习与工程参考。\n\n## 环境准备\n\n### 系统要求\n支持主流操作系统，代码已在以下环境中通过自动化测试：\n- **Windows**: MSVC 19 (2022)\n- **macOS**: AppleClang 15.0.15+\n- **Linux (Ubuntu)**: GCC 13.3.0+\n\n### 前置依赖\n- **编译器**：需安装支持 **C++17** 标准的编译器（如 `g++`, `clang++` 或 `MSVC`）。\n- **构建工具**：推荐使用 `CMake` 进行项目管理（可选，也可直接使用编译器命令）。\n- **依赖库**：**无**。所有实现仅依赖 C++ 标准模板库 (STL)，无需安装第三方库。\n\n> **国内加速建议**：\n> - 若使用 Ubuntu\u002FDebian，可替换为清华或阿里镜像源安装编译工具：\n>   ```bash\n>   sudo sed -i 's\u002Farchive.ubuntu.com\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fg' \u002Fetc\u002Fapt\u002Fsources.list\n>   sudo apt update\n>   ```\n\n## 安装步骤\n\n本项目无需传统“安装”，只需克隆仓库即可使用。\n\n1. **克隆仓库**\n   使用 Git 将代码拉取到本地：\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002FTheAlgorithms\u002FC-Plus-Plus.git\n   cd C-Plus-Plus\n   ```\n   > **国内加速**：如果访问 GitHub 较慢，可使用 Gitee 镜像（如有）或配置 Git 代理：\n   > ```bash\n   > git clone https:\u002F\u002Fgitee.com\u002Fmirror\u002FTheAlgorithms-C-Plus-Plus.git # 示例地址，请以实际存在的镜像为准\n   > ```\n   > 若无特定镜像，建议使用 `git clone` 配合终端代理。\n\n2. **验证环境**\n   确保编译器支持 C++17：\n   ```bash\n   g++ --version\n   # 输出中应包含支持 C++17 的信息\n   ```\n\n## 基本使用\n\n### 1. 浏览算法目录\n算法按类别存放在不同文件夹中（如 `sorting`, `math`, `dynamic_programming` 等）。\n```bash\nls sorting\n# 输出示例：bubble_sort.cpp, merge_sort.cpp, quick_sort.cpp\n```\n\n### 2. 编译单个算法\n选择一个算法文件（例如 `sorting\u002Fbubble_sort.cpp`），使用 `g++` 编译：\n```bash\ng++ -std=c++17 -O2 -o bubble_sort sorting\u002Fbubble_sort.cpp\n```\n- `-std=c++17`：强制使用 C++17 标准。\n- `-O2`：开启优化。\n- `-o bubble_sort`：指定输出可执行文件名。\n\n### 3. 运行程序\n直接运行生成的可执行文件：\n```bash\n.\u002Fbubble_sort\n```\n*注：许多算法文件包含内置的自测函数（Self-checks），运行后会自动输出测试结果或演示数据。*\n\n### 4. 在线查看文档\n如需查看详细的代码解释、流程图及 STL 函数链接，可访问官方生成的在线文档：\n[https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus](https:\u002F\u002FTheAlgorithms.github.io\u002FC-Plus-Plus)\n\n### 5. 云端开发（可选）\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-Plus-Plus)","某高校计算机系教授在准备《数据结构与算法》课程实验时，需要为学生演示多种排序和图论算法的高效 C++ 实现，并确保代码能在不同操作系统上无缝运行。\n\n### 没有 C-Plus-Plus 时\n- 教授需从零编写或网上拼凑代码，难以保证算法实现的准确性和规范性，容易引入教学误导。\n- 缺乏统一的文档和注释，学生阅读源码时难以理解核心逻辑，学习曲线陡峭。\n- 代码依赖外部库或未遵循标准，导致在 Windows、MacOS 或 Linux 等不同环境下编译失败，调试耗时。\n- 缺少内置的自我验证机制，教师需手动编写测试用例来验证算法正确性，增加了备课负担。\n- 难以展示同一问题的多种解法（如不同策略的排序），限制了学生对算法优化的深入理解。\n\n### 使用 C-Plus-Plus 后\n- 直接调用仓库中经过严格测试的成熟算法实现，确保教学内容准确无误，提升课堂质量。\n- 源码自带详细注释和标准化文档，学生可自助研读，快速掌握从 STL 应用到算法原理的细节。\n- 代码严格遵循 C++17 标准且无外部依赖，在三大主流操作系统上均能一键编译通过，跨平台教学无忧。\n- 程序内置自我检查功能，自动验证输出结果，让教师和学生都能对算法的正确性充满信心。\n- 提供同一目标的多种实现方案（如快速排序与归并排序对比），便于开展横向对比教学，深化优化思维。\n\nC-Plus-Plus 将繁琐的底层实现转化为标准化的教学资源，让教育者专注于算法思维的传递而非代码纠错。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTheAlgorithms_C-Plus-Plus_39000511.png","TheAlgorithms","The Algorithms","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FTheAlgorithms_48fd3da3.png","Open Source resource for learning Data Structures & Algorithms and their implementation in any Programming Language",null,"hello@the-algorithms.com","the_algorithms","https:\u002F\u002Fthe-algorithms.com\u002F","https:\u002F\u002Fgithub.com\u002FTheAlgorithms",[85,89,93,97],{"name":86,"color":87,"percentage":88},"C++","#f34b7d",98.6,{"name":90,"color":91,"percentage":92},"CMake","#DA3434",1.3,{"name":94,"color":95,"percentage":96},"Python","#3572A5",0.1,{"name":98,"color":99,"percentage":100},"Dockerfile","#384d54",0,34006,7751,"2026-04-04T02:12:39","MIT",4,"Windows, macOS, Linux (Ubuntu)","未说明",{"notes":109,"python":110,"dependencies":111},"该项目为纯 C++ 算法实现，无需外部库或 Python 环境。代码严格遵循 C++17 标准，确保在嵌入式系统（如 ESP32, ARM Cortex）上的可移植性。每个源文件均包含自检功能以验证实现正确性。","不适用",[112,113],"C++17 标准兼容编译器 (如 MSVC 19, AppleClang 15, GNU 13.3.0)","C++ STL",[54,51,13],[116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131],"cpp","algorithm","algorithms-implemented","data-structures","algorithm-competitions","interview-preparation","interview-questions","search","sort","educational","instructor-materials","machine-learning-algorithms","artificial-intelligence-algorithms","computer-science","machine-learning","mathematics",5,"2026-03-27T02:49:30.150509","2026-04-06T05:17:01.009258",[],[]]