* Quality of life
FIX: initlized sum to 1 instead of adding it before return
CHORE: cleaned documentation aswell as adding new documentation, namespace math added
* Update math/check_amicable_pair.cpp
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Update math/check_amicable_pair.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_amicable_pair.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_amicable_pair.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for bc87fea5
* clang-format and clang-tidy fixes for 0a19d1ad
---------
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* Next higher number with same set bits implimented
* Added to DIRECTORY.md
* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp
new line aded
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp
* added
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp
recomendation added
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update next_higher_number_with_same_number_of_set_bits.cpp
int to int64_t
* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
---------
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Revert "feat: update CMake version to 3.26.4 (#2486)"
This reverts commit 2d492834b1.
* clang-format and clang-tidy fixes for d40bf643
---------
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* update cmake version
* clang-format and clang-tidy fixes for 402c5627
---------
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* Quality of life update
FIX: added namespace math, changed for a weird for loop to a while loop with a better conditional and I initiation
CHORE: Cleaned documentation and added details plus links. removed the invalid cout lines in test for one line.
* Update math/check_factorial.cpp
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Update math/check_factorial.cpp
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Update math/check_factorial.cpp
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* chore: apply suggestions from code review
* Updated last return in is_factorial
* Update math/check_factorial.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
---------
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: add memory game and a games folder
* fix: `clang-tidy` warnings (hopefully)
* fix: use `random_shuffle`
`random_shuffle` was removed in C++17, however, we're using C++11 here, so there should be no harm.
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for 8cd0a772
* fix: remove repeated `random` header
* clang-format and clang-tidy fixes for 02786880
* fix: Windows build errors
* fix: CI warnings (hopefully)
* fix: CI warnings
* fix: (finally) CI warnings
* fix: wrong parameter name
* fix: yet another attempt to fix CI
---------
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* fix: make N_bonacci return an array of size m
* tests: simplify test, add new test cases
* style: remove unused include, update include justifications
* fix: cover the case n == 0
* fix: initialise properly res, set properly size of ans
* test: add check with empty input
* style: use const reference as input type
* refactor: add ind_type
* style: use reverse interators to b
* style: use auto in definition of idx
* updating DIRECTORY.md
* style: clean-up includes
* style: use std::string::size_type in definition of ind_type
---------
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: fit euler's totient to the contribution guidelines.
* Update math/eulers_totient_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/eulers_totient_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: add more tests
notes: i should have added euler's number first
* fix: revert description
* Update math/eulers_totient_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/eulers_totient_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* chore: apply suggestions from code review
* chore: apply suggestions from code review
---------
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: add Stooge sort algorithm
* docs: add documentation for function parameters and includes
* test: add new tests for the Stooge sort
* docs: Update functions descriptions
* fix: Update parameter type to size_t
* doc: Add message that the tests have passed
* fix: Update return statement structure
---------
Co-authored-by: David Leal <halfpacho@gmail.com>
* added log code for counting digits
* one space removed
* fix: CI warnings (hopefully)
* fix: revert for now
* decoupled test functions
* Update math/finding_number_of_digits_in_a_number.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/finding_number_of_digits_in_a_number.cpp
typo changes
Co-authored-by: David Leal <halfpacho@gmail.com>
* uint64_t changed to double to resolve clang-tidy warnings
* clang-format and clang-tidy fixes for 61bb2dea
* comment improvement
* clang-format and clang-tidy fixes for 39ebc33d
* guarded required function
---------
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* fix: remove memory leak in queue
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for effd74c9
* style: simplify logic while using reserve
* style: use value_type as return type in front
* style: use proper error message
* style: use pre-increment and pre-decrement
* docs: use doxygen syntax
* docs: improve wording
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* Boruvkas Algorithm Implementation
Implemented Boruvkas Algorithm under graphs as a means for finding the minimums spanning tree
* Boruvkas Algorithm Implementation
Implemented Boruvkas algorithm, a greedy algorithm to find a graphs minimum spanning tree.
* Update climits
limits.h to climits
Co-authored-by: David Leal <halfpacho@gmail.com>
* Fixes for maintainability
Made changes as recommended by Panquesito7 for maintainability and security
* Fixed boruvkas main
Made suggested changes
Co-authored-by: David Leal <halfpacho@gmail.com>
* Suggested changes for Boruvkas
Changed from graph to greedy algorithm, removed the extra main(), general fixes
* Update Boruvkas readability, CI Workflow
General readability changes, change push_back to implace_back
* Update Boruvkas memory allocation
Added pre-allocation of memory for the parent vector of Boruvkas
* Fixed file name, added namespace
Fixed file name, added Boruvkas namespace, made suggested changes
* Update boruvkas spacing
Fixed spacing hopefully
* Update boruvkas spacing
Fixing weird tabs
* Update Boruvkas tabs spacings
Finally done with spacing i think
* Boruvkas - Finished spacing
Triplle checked tabs/spaces
* chore: apply suggestions from code review
* fix: CI issues (hopefully)
* fix: last fix
Co-authored-by: David Leal <halfpacho@gmail.com>
* Added aliquot_sum.cpp
* Fixed indentation and changed argument to ull int
* Fixed type of I
* Made parameter as const
* Made some required changes
* Added changes due to namespace
* Formatting changes
Co-authored-by: David Leal <halfpacho@gmail.com>