discrete mathematics - How to write psuedocode to compute n!!(double factorial) recursively? -


n!!= 1*3*...*n, if n odd. n!!= 2*4*...*n, if n even. 

i've been trying, i'm having tough time starting problem.

if n = 1, n!! = 1   if n = 2, n!! = 2   else n!! = n * (n-2)!! 

Comments

Popular posts from this blog

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

scikit learn - python sklearn KDTree with haversine distance -