I have n!/((n-r)!r!)
which I figured out how to make recursive:
int crn (int n, int r)
{
if (r==0||r==n)
return 1;
return (n-1)+(n-1,r-1);
}
how do I make it non-recursive?
I have n!/((n-r)!r!)
which I figured out how to make recursive:
int crn (int n, int r)
{
if (r==0||r==n)
return 1;
return (n-1)+(n-1,r-1);
}
how do I make it non-recursive?
I have n!/((n-r)!r!)
which I figured out how to make recursive:
int crn (int n, int r) { if (r==0||r==n) return 1; return (n-1)+(n-1,r-1); }
how do I make it non-recursive?
what is this?? This is not a program, nor is it a recursive function and it does not calculate factorial. Did you even read this before posting it?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.