Get your base case right and you're 1/n th of the way there. Get your recursive calls right and you've got the other (n-2)/n th right.
Then you only need to account for the off by one error and you're done.
:)
Get your base case right and you're 1/n th of the way there. Get your recursive calls right and you've got the other (n-2)/n th right.
Then you only need to account for the off by one error and you're done.
:)