Skip to content

feat: Add memoized version of factorial#2964

Merged
realstealthninja merged 24 commits intoTheAlgorithms:masterfrom
git5v:feature-dp-algo
Aug 23, 2025
Merged

feat: Add memoized version of factorial#2964
realstealthninja merged 24 commits intoTheAlgorithms:masterfrom
git5v:feature-dp-algo

Conversation

@git5v
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Comment thread dynamic_programming/factorial_top_down_dp.cpp Outdated
Comment thread dynamic_programming/factorial_top_down_dp.cpp Outdated
Comment thread dynamic_programming/factorial_top_down_dp.cpp Outdated
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
Copy Markdown
Contributor Author

git5v commented Aug 21, 2025

Changes has been updated thanks

Copy link
Copy Markdown
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

Comment thread dynamic_programming/factorial_top_down_dp.cpp Outdated
@realstealthninja
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread math/factorial_memoization.cpp Outdated
Comment thread math/factorial_memoization.cpp
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
Comment thread math/factorial_memoization.cpp
Comment thread math/factorial_memoization.cpp
Comment thread math/factorial_memoization.cpp Outdated
Comment thread math/factorial_memoization.cpp Outdated
Comment thread math/factorial_memoization.cpp Outdated
Comment thread math/factorial_memoization.cpp Outdated
Comment thread math/factorial_memoization.cpp
@realstealthninja realstealthninja added testing approved Approved; waiting for merge labels Aug 22, 2025
@realstealthninja
Copy link
Copy Markdown
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