2 Commits

Author SHA1 Message Date
Piotr Idzik
43ce63682a fix: remove potential segmentation fault from factorial_memoization.cpp (#2994) 2025-09-05 12:31:44 +00:00
Vedant Mukhedkar
f1ff652601 feat: Add memoized version of factorial (#2964)
* Create check_even_odd.cpp

Implementation to Check if a number is Even or Odd using Bitwise Operator

* Update check_even_odd.cpp

* Create factorial_top_down_dp.cpp

* Delete dynamic_programming/factorial_top_down_dp.cpp

Deleted the one file as there was 2 files in the commit

* Create factorial_top_down_dp.cpp

* Delete bit_manipulation/check_even_odd.cpp

* Update dynamic_programming/factorial_top_down_dp.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update dynamic_programming/factorial_top_down_dp.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update dynamic_programming/factorial_top_down_dp.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update factorial_top_down_dp.cpp

modified

* Update factorial_top_down_dp.cpp

added __uint128_t for handling  fixed-width integer types

* Create memoised_factorial.cpp

* Rename memoised_factorial.cpp to factorial_memoization.cpp

* Update factorial_memoization.cpp

* Delete dynamic_programming/factorial_top_down_dp.cpp

deleted the file from dp folder

* Update math/factorial_memoization.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update factorial_memoization.cpp

added cstdint header and switched to uint64 Thanks

* fix: wrap factorial functions under math namespace

* chore: add scope specifier in test cases

* doc: add documentation to headers

* doc: add defintion of memoisation as well as rewrite brief

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2025-08-23 14:45:40 +00:00