| ▲ | qsort a day ago | |||||||
You don't need space for 40!/20!, for example:
The same idea can be trivially tweaked to compute any binomial coefficient without ever storing an integer greater than the final result. | ||||||||
| ▲ | ogogmad a day ago | parent [-] | |||||||
Good point. But what if `i` does not divide `ans` evenly? I suppose you could use floats and then round. | ||||||||
| ||||||||