Skip to content

feat: Add memoized version of factorial #2964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 23, 2025

Conversation

git5v
Copy link
Contributor

@git5v git5v commented Jul 11, 2025

Description of Change
Added factorial_memoization.cpp to the math directory, implementing factorial calculation using recursion with memoization (top-down dynamic programming).

file location for ref: math/factorial_memoization.cpp

git5v and others added 5 commits June 30, 2025 18:18
Implementation to Check if a number is Even or Odd using Bitwise Operator
Deleted the one file as there was 2 files in the commit
@git5v git5v changed the title Create a file factorial_top_down_dp o the dynamic programming directory Create a file factorial_top_down_dp to the dynamic programming directory Jul 11, 2025
Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Aug 11, 2025
@git5v git5v marked this pull request as draft August 11, 2025 05:49
@git5v git5v marked this pull request as ready for review August 11, 2025 05:50
@git5v
Copy link
Contributor Author

git5v commented Aug 11, 2025

@Panquesito7

@github-actions github-actions bot removed the stale Author has not responded to the comments for over 2 weeks label Aug 12, 2025
git5v and others added 4 commits August 21, 2025 13:16
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
@git5v
Copy link
Contributor Author

git5v commented Aug 21, 2025

Changes has been updated thanks

Copy link
Contributor Author

@git5v git5v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the changes suggested added the header required files

@realstealthninja
Copy link
Collaborator

Shouldnt this be in math directory since factorial is mathematics, Also the file name is too long rename the file to factorial_memoized.cpp or any other alternative.

@realstealthninja realstealthninja changed the title Create a file factorial_top_down_dp to the dynamic programming directory feat: Add memoized version of factorial Aug 21, 2025
Copy link
Contributor Author

@git5v git5v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed the file used uint128 and moved file under math folder thanks

git5v and others added 2 commits August 22, 2025 10:56
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
added cstdint header and switched to uint64 Thanks
@realstealthninja realstealthninja added testing approved Approved; waiting for merge labels Aug 22, 2025
@realstealthninja
Copy link
Collaborator

Tested and verified.

@realstealthninja realstealthninja merged commit f1ff652 into TheAlgorithms:master Aug 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants