TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.73k stars 7.28k forks source link

[FIX] Pre-existing algorithms do not fit the contribution guidelines #2456

Open realstealthninja opened 1 year ago

realstealthninja commented 1 year ago

Detailed description

Times change

so does the development of algorithms and documentation

Some of the older algorithms existing in this repository do not fit the contribution guidelines.

A short list of examples:

Context

Educating new developers on coding standards is a major priority; As the industry today relies heavily on documentation; If you were to ask any API developer/user on what the most important part of their development and use it will always be:

having a fast and performant algorithm is good but whats the point if you cant understand how it works or even why it works.

I think it is in the best interest of us to document our algorithms.

As i consider all algorithms must be:

Possible implementation

No response

Additional information

Others in the past have made major changes like this to this repository and i think its time for us to do the same. to keep the torch moving.

An homage to @kvedala for their part in trying to standardize this repository #805

Kunal766 commented 1 year ago

Hi, I wanted to start contributing to this repository ,can you assign me this problem

realstealthninja commented 1 year ago

No sorry no assigning in this repository just start making a pull request and we will review to help you.❤️

Note: assigning requires triage access

CodeSinghh commented 1 year ago

how can help so that this issue will be resolved

realstealthninja commented 1 year ago

how can help so that this issue will be resolved

just find an algorithm that does not fit the contribution guidelines and start fixing it! we will close this issue once ALL the algorithms are fixed! :smile:

ewd00010 commented 1 year ago

Math Directory Checklist

Below is the list of algorithms to be checked within the maths repository. Footnotes provide details to potential changes This is a guide. Please fully check any file you work on! You may find other changes are needed.

[^1]: This algorithm needs a small amount of changes [^2]: This algorithm needs a large amount of changes [^3]: Test rework [^4]: Doc rework [^5]: Code rework

rbevin777 commented 1 year ago

In terms of making these changes/fixes to the style to fit the guidelines. How do you want PRs to work? My thinking was just 1 small PR based on changes to one module to minimize the changes which need reviewed.

realstealthninja commented 1 year ago

In terms of making these changes/fixes to the style to fit the guidelines. How do you want PRs to work? My thinking was just 1 small PR based on changes to one module to minimize the changes which need reviewed.

one pr for one file

rbevin777 commented 1 year ago

I'm starting to look at the area.cpp file here just so no one picks it up by accident 😁

Bl1xvan commented 1 year ago

Please assign me fast_power.cpp

dylancusson commented 1 year ago

Submitted a PR for sum_of_digits.cpp It's my first PR so let me know if adjustments are needed. I did forget my .vscode json was in there, I'll remember to exclude it from my commit next time!

realstealthninja commented 2 months ago

let's get this finished

We still need more help on this! Open a pr for any of the algorithms in the math directory and fix it by adding documentation and tests!

Please mention it here by referencing the pr with the # prefix ♥️

realstealthninja commented 1 month ago

if anyone's interested in doing an algorithm in this list for hacktoberfest feel free to raise an issue of your preferred algorithm. Ill be happy to apply the label to it. :heart: happy hacking!

please make sure to link both this and your new issue when creating the pr!

ritk20 commented 1 month ago
  • [ ] lcm_sum.cpp 1 42 is there a more efficient version of this?

I don't think there is a more efficient version. I found some proofs of this algorithm here and here but I couldn't find anything better.

Also, this is in the wrong section of The Algorithms website here with other functions to calculate LCM of two numbers.

If there isn't a better approach, I will fix the doc & test issues.