```python
def nCr(n, r):
    """
    Computes the binomial coefficient "n choose r".
    nCr = n! / (r! * (n-r)!)
    """
    if r < 0 or r > n:
        return 0
    
    # Use the symmetry property nCr(n, r) == nCr(n, n-r) for efficiency
    if r > n - r:
        r = n - r
    
    # Using the multiplicative formula which is more efficient
    # and avoids large intermediate numbers from factorials:
    # nCr = (n * (n-1) * ... * (n-r+1)) / r!
    res = 1
    for i in range(r):
        res = res * (n - i) // (i + 1)
        
    return res
```