* 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>
* 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>
* 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>
* fix: power_of_two algorithm redundant conditional 'else'
* feat : add modular_inverse_simple
* updating DIRECTORY.md
* fix : according lint rules
* fix : removed macro and initialize variable aux
* fix: remove namespace std like default
* feat : add unsigned type for block negative number and improving description
* fix: defined in header <cstdint> for use uint64_t type
* fix: improving descriptive comments
* fix: remove redundant lib
* fix: improvinf "brief" and "details" acording suggestion in review
* fix: improving descrition of function imod acording suggestion in review
* fix: improving descrition acording suggestion in review
* Update modular_inverse_simple.cpp
* Apply suggestions from code review
* clang-format and clang-tidy fixes for 768a99c8
* Apply suggestions from code review
* Apply suggestions from code review
* updating DIRECTORY.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: rewrite prime numbers using linear sieve
* fix code scanning error
* clang-format and clang-tidy fixes for 0afd463b
* fix sign-compare warning
* clang-format and clang-tidy fixes for 6ddff0f7
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* feat: added math/area.cpp
* feat: added surface area of sphere, cube and cylinder
* docs: modified @brief
* feat: changed to template functions
* test: added 2 test cases for square_area()
* test: added 3rd test case
* [test/docs] added more test cases and docs for them
* docs: added @details
* updating DIRECTORY.md
* fix: changed from math.h to cmath
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: added algorithms to the math namespace
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: call functions from the math namespace for testing
* fix: style indentation
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: style indentation
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: uses uint16_t instead of int for testing
* docs: added comments for testing variables
* fix: style guide
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>
* Create reverse_binary_tree.cpp
* Added documentation
Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT
* Added documentation
* Renamed tests to test
* Fixed issue with incorrect using statement
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for fb86292d
* Added Test cases
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Changed int to int64_t
* Updated documentation wording
* Fixed wrong integer type
Changed int64_t to int32_t
* clang-format and clang-tidy fixes for 2af706b1
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* updated the code to make it more efficient
* Update math/check_prime.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/check_prime.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: Add monte carlo integration
* test: Add tests for monte carlo integration
* docs: Add documentation for monte carlo integration
* updating DIRECTORY.md
* fix: Add _USE_MATH_DEFINES for windows
* fix: Comment spacing
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>
* Finding no. of digits in a Number
* Initialize n
* Initialize n as int
* Changes done
* Changes done with codes by adding more comments
* Changes done with codes by adding name as md
* Modified comments
* add void
* remove void & update comments
* Set some changes to pass Awesome CI Workflow
* add return 0 & file name in lower case
* Changes done..
* Update finding_number_of_Digits_in_a_Number.cpp
* Update finding_number_of_Digits_in_a_Number.cpp
* Update finding_number_of_Digits_in_a_Number.cpp
* formatting filenames 0ec45e33
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for 0ec45e33
* clang-format and clang-tidy fixes for 9c0a437e
* updating DIRECTORY.md
* Wrote test, needs review
* [fix/docs]: Fix tests/code and add documentation
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* cross product of two vectors
* cross product of two mathematical vectors (fixed)
* cross product of two mathematical vectors (fixed)
* updating DIRECTORY.md
* cross product of two mathematical vectors (fixed)
* cross product of two mathematical vectors (fixed)
* cross product of two mathematical vectors (fixed)
* cross product of two vectors (with tests)
* cross product of two mathematical vectors (fixed)
* cross product of two vectors (with example fixed)
* cross product of two vectors
* cross product of two mathematical vectors
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* feat: Add ncr mod p code (#1323)
* Update math/ncr_modulo_p.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Added all functions inside a class + added more asserts
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for f6df24a5
* Replace int64_t to uint64_t + add namespace + detailed documentation
* clang-format and clang-tidy fixes for e09a0579
* Add extra namespace + add const& in function arguments
* clang-format and clang-tidy fixes for 8111f881
* Update ncr_modulo_p.cpp
* clang-format and clang-tidy fixes for 2ad2f721
* Update math/ncr_modulo_p.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/ncr_modulo_p.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update math/ncr_modulo_p.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for 5b69ba5c
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for a8401d4b
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>