Match Statements Problems Related Factorial Number S Using Following View Graphs Reference Q37206324

Match the statements for the problems related to thefactorial of a number(s) using the following view graphs as areference.

1 2 I/ Implementation-1: Factorial 3 def factorial (n): if n0: return 1 * factorial (n-1) 7 print (factorial (4)) 9 I/ Implem

Implementation-2 is – Answer

return factTable [n] – Answer

return 1 – Answer

factTable [0] = 1 – Answer

Implementation-1 Time Complexity to find both n! and m! -Answer

mplementation-1 Time Complexity for n! – Answer

factTable [n] = n * factorial (n-1) – Answer

Implementation-2 Time Complexity to find both n! and m! is -Answer

Implementation-2 SPACE Complexity to find both n! and

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.