C++ 算法大全
Go to file
Nitin Sharma 97afa0e3e4
feat: add Sublist Search Algorithm (#1513)
* feat: add sublist search algorithm

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for e59bc3bf

* Update search/sublist_search.cpp header docs

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update search/sublist_search.cpp docs

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update docs search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update docs search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update minor docs in  search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* made test function non static

Co-authored-by: David Leal <halfpacho@gmail.com>

* test docs updated

Co-authored-by: David Leal <halfpacho@gmail.com>

* namespaces added for search algo, docs added for test cases

* [feat/fix/docs]: Perform some necessary changes

* clang-format and clang-tidy fixes for 5a02b336

* test cases docs added, merge fixed

* clang-format and clang-tidy fixes for be0160b4

* one liner docs added

* clang-format and clang-tidy fixes for 95b362f3

* some final docs fixes

* clang-format and clang-tidy fixes for 798972e9

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* docs updated for one line docs

* clang-format and clang-tidy fixes for aebae1df

* added one liner docs

* clang-format and clang-tidy fixes for f6913b75

* Update search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 66d1b87f

* Update search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Apply suggestions from code review

* clang-format and clang-tidy fixes for dc5b0c6c

* Apply suggestions from code review

* clang-format and clang-tidy fixes for 6436932f

* Apply suggestions from code review

* clang-format and clang-tidy fixes for 35f39b57

* Update docs search/sublist_search.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-07 14:53:29 +05:30
.github feat: Add the Approved Label workflow (#1493) 2021-05-10 10:28:23 -05:00
.vscode fix: Add endline (.vscode/settings.json) 2020-08-11 00:25:21 -05:00
backtracking feat: added highlighting differences in Sudoku Solver (#1438) 2021-01-05 15:10:27 +05:30
bit_manipulation feat: Hamming distance algorithm. (#1376) 2021-02-17 08:08:29 +05:30
ciphers Feat: Implementation of Elliptic Curve Diffie Hellman Key Exchange. (#1479) 2021-04-14 11:04:01 +05:30
data_structures feat: add spare table data structure (#1502) 2021-06-07 15:24:49 -05:00
doc Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
dynamic_programming [feat/fix/docs]: Improve the dynamic_programming/longest_increasing_subsequence.cpp file (#1504) 2021-06-18 14:17:31 -05:00
geometry Added Jarvi algo to find convex hull 2020-08-17 02:46:38 +05:30
graph fix: Add endline in... 2021-02-11 20:34:41 -06:00
graphics Revert "updated free glut checksum (#976)" (#979) 2020-07-24 16:41:01 -04:00
greedy_algorithms feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30
hashing fix error reusing struct keyword 2020-07-30 18:39:24 -04:00
linear_algebra feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30
machine_learning fix: CodeQL warnings in `machine_learning/a_st... 2021-04-08 18:39:28 -05:00
math feat: added integral approximation algorithm (#1485) 2021-04-22 22:11:44 +05:30
numerical_methods feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30
operations_on_datastructures feat: Multiple Variants of Search on Trie (#1456) 2021-02-24 14:03:25 +05:30
others feat: Added implementation of iterative version of tree traversals. (#1506) 2021-07-05 19:32:41 -05:00
probability Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
range_queries feat: Added persistent segment tree with lazy propagation (#1445) 2021-02-08 11:19:26 -06:00
search feat: add Sublist Search Algorithm (#1513) 2021-07-07 14:53:29 +05:30
sorting feat: add random pivot quick sort algorithm (#1510) 2021-07-06 22:49:27 +05:30
strings Added Horspool algorithm (#1071) 2020-09-03 20:12:56 -04:00
.clang-format [bug fix] fix code formatting in CI (#1052) 2020-08-26 10:48:08 -04:00
.clang-tidy [code fix] Fixed trie_tree for code quality and docs & clang-tidy error check (#1059) 2020-08-27 12:30:14 -04:00
.gitignore Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
.gitpod.dockerfile install freeglut3-dev (#973) 2020-07-23 15:51:48 -04:00
.gitpod.yml enable gitpod for all branches 2020-07-10 10:43:05 -04:00
CMakeLists.txt Merge branch 'master' into fixgraph 2020-08-14 16:47:21 -07:00
CODE_OF_CONDUCT.md [fix/feat]: Added Code of Conduct (#1135) 2020-10-14 16:17:27 -05:00
CodingGuidelines.md [feat/fix]: Improve the contributing guidelines... (#1522) 2021-07-05 22:02:33 -05:00
CONTRIBUTING.md [feat/fix]: Improve the contributing guidelines... (#1522) 2021-07-05 22:02:33 -05:00
DIRECTORY.md feat: add Sublist Search Algorithm (#1513) 2021-07-07 14:53:29 +05:30
LICENSE fix: Update copyright notice to 2021 (#1440) 2021-01-07 22:18:38 -06:00
README.md feat: Add Discord chat badge in README.md 2021-04-16 13:01:03 -05:00
REVIEWER_CODE.md feat: guidelines for reviewers (#1302) 2020-10-16 16:18:38 -04:00

The Algorithms - C++

Gitpod Ready-to-Code Language grade: C/C++ CodeQL CI Gitter chat contributions welcome GitHub repo size Doxygen CI Awesome CI Income Discord chat Donate

Overview

The repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under MIT License. The 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.

Features

  • The repository provides implementations of various algorithms in one of the most fundamental general purpose languages - C++.
  • Well documented source code with detailed explanations provide a valuable resource for educators and students alike.
  • Each source code is atomic using STL classes and no external libraries are required for their compilation and execution. Thus the fundamentals of the algorithms can be studied in much depth.
  • Source codes are compiled and tested for every commit on the latest versions of three major operating systems viz., Windows, MacOS and Ubuntu (Linux) using MSVC 16 2019, AppleClang 11.0 and GNU 7.5.0 respectively.
  • Strict adherence to C++11 standard ensures portability of code to embedded systems as well like ESP32, ARM Cortex, etc. with little to no changes.
  • Self-checks within programs ensure correct implementations with confidence.
  • Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.

Documentation

Online Documentation 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. Click on Files menu to see the list of all the files documented with the code.

Documentation of Algorithms in C++ by The Algorithms Contributors is licensed under CC BY-SA 4.0
Creative Commons LicenseCredit must be given to the creatorAdaptations must be shared under the same terms

Contributions

As a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our Contribution Guidelines.