31std::array<uint64_t, 1000>
memo{0};
62 std::cout <<
"All test cases passed!\n";
std::array< uint64_t, 1000 > memo
Array to store computed factorials for memoization.
void test_fact_recursion()
Self-test implementations for the fact_recursion function.
int main()
Main function to run test cases and interact with the user.
uint64_t fact_recursion(uint64_t n)
Computes the factorial of a non-negative integer using recursion and memoization.