Is there a way to find the number of combinations (not the actual combinations), in O(1)? I read an answer here - time and space complexity of finding combination (nCr). The answer says that it takes O(n!) to find the actual combinations but only takes O(1) to find the number of such combinations. I couldn't understand how it can be done. Please explain me how to do that in O(1). Here, O(1) is time complexity.
[edit]:The main problem I'm having is how to implement n! in O(1).