Home > Back-end >  The code analysis
The code analysis

Time:10-06

Can you help me to write the main code analysis
Int compute_bell (int row, int position)
{
If (row==1)
return 1;
If (row==2 & amp; & The position==1)
return 1;
The else
{
If (position==1)
Return compute_bell (row row - 1, 1);
The else
Return compute_bell (row, the position - 1) +
Compute_bell (the position row - 1, 1);
}
}

CodePudding user response:

Where did you get the code?

CodePudding user response:

reference 1st floor lirg8405 response:
where did you get the code?

The search on the net...

CodePudding user response:

This should be a branch of recursive method the algorithm to solve the problem, but this code to orz you hide the tail also don't know what to use recursion to solve

CodePudding user response:

black fertilizer will play a reference 3 floor response:
this should be a branch of recursive method the algorithm to solve the problem, but this code to orz you hide the tail also don't know what to use recursion to solve

Haha that's ok, solved
  • Related