• + 0 comments

    You can improve the speed of this by keeping the calcuated factorials and using them in next iteration instead of calcualting it again.