动态规划(Dynamic Programming)、位操作(Bit Manipulation)、回溯(Backtracking)算法等C++版算法实现。涵盖了计算机科学、数学和统计、数据科学、机器学习、工程等领域的各种主题。

dependabot[bot] 8cd86b1eda chore(deps): bump json5 from 1.0.1 to 1.0.2 (#1274) 2 weeks ago
.github 7ea7d7b8c6 docs: improve the issue forms (#1272) 1 month ago
.husky 16fa774012 chore: only test changed packages (#1194) 3 months ago
Backtracking 71d3d4470f tests: improve for GeneratePermutations (#1263) 2 months ago
Bit-Manipulation 78f023fdd1 algorithm: Log2 using bitwise operations (#1132) 3 months ago
Cache 4ce3dbe6b4 dependencies: update and clean (and auto-fix style issues) (#1195) 3 months ago
Cellular-Automata 1cef191494 merge: Made all tests follow file strcture convention already in-place (#820) 1 year ago
Ciphers 907b86c343 Rename to CaesarCipher (#1144) 3 months ago
Conversions cc0700f122 conversion: liters to imperial gallons (#1256) 2 months ago
Data-Structures c5101e3e2b chore: add reverse to singly linked list (#1241) 3 months ago
Dynamic-Programming 5668e64b29 algorithm: unique paths 2 (#1257) 2 months ago
Geometry 863185d2b4 algorithm class: pyramid (#1254) 2 months ago
Graphs b88128dd97 algorithm: LCA by binary lifting (#1237) 3 months ago
Hashes 072523d594 merge: Fix spellings (#821) 1 year ago
Maths 65cceae0be algorithm: signum (#1266) 1 month ago
Navigation 2ae00a97dc merge: add description (#843) 1 year ago
Project-Euler 0fab492ceb fix: Project Euler P35 off-by-one error (#1238) 3 months ago
Recursive 5364a1c31b chore: check for invalid input to factorial (#1229) 3 months ago
Search b71815d50c Fix grammar mistakes in JSDoc (#1127) 3 months ago
Sorts 18baef8e7e feat: insertion sort with binary search (#1182) 3 months ago
String 00a97d5e1b algorithm: percentage of letter (#1261) 2 months ago
Timing-Functions e18718b7d5 Remove live code & console.log, leave examples as comments. 1 year ago
Trees cf482c4eef fix typo in FenwickTree.js (#1208) 3 months ago
.gitignore b793105009 Update .gitignore 1 year ago
.gitpod.yml ff606a019e chore: improve the Gitpod file (#1203) 3 months ago
.prettierrc e112434dee Add tests to Math (#423) 2 years ago
CONTRIBUTING.md cb4c40e95c docs: improve the contributing guidelines (#1271) 1 month ago
DIRECTORY.md b36b45888e docs: fix CI and remove LGTM badges (#1269) 1 month ago
LICENSE 386c646ac5 Initial commit 5 years ago
README.md b36b45888e docs: fix CI and remove LGTM badges (#1269) 1 month ago
babel.config.cjs 8c64f99316 Officially switching to ES Module system. 1 year ago
package-lock.json 8cd86b1eda chore(deps): bump json5 from 1.0.1 to 1.0.2 (#1274) 2 weeks ago
package.json 16fa774012 chore: only test changed packages (#1194) 3 months ago

README.md

The Algorithms - JavaScript

JavaScript Repository of TheAlgorithms, which implements various algorithms and data structures in JavaScript.

[![JavaScript Banner][banner]](DIRECTORY.md) [![Checks][checks]][actions] [![Contributions Welcome][welcome]](CONTRIBUTING.md) [![standard.js][standard-logo]][standard-js] [![Discord chat][chat]][discord-server]

These implementations are for demonstrative purposes only. Dedicated implementations of these algorithms and data structures are much better for performance and security reasons. We also do not provide any guarantee for api stability.


Before contributing to this repository, make sure to read our Contribution Guidelines. You can look at other TheAlgorithms Repositories or the issues with a "help wanted" label for inspiration regarding what to implement. Our maintainers will guide you through how to make your contribution properly if you make any mistakes. The names of the maintainers of this repository are listed in the CODEOWNERS file.

You can find a list of the algorithms currently in the repository in the directory. Explanations of many of the algorithms can be found in the wiki.