3 ms·
The difference is that the constraint of using a signed int as the length of the array is known and available to users of the function. What happens when you tr
by InclinedPlane 17y ago
The difference is that the constraint of using a signed int as the length of the array is known and available to users of the function. What happens when you try to do that is you get a compiler error, because it won't implicitly cast from, say, bigint or unsigned int down to signed int, for example. That's not necessarily a defect, that's just a constraint.
This contrasts with the overflow defect which would cause the mergesort routine to fail when given an otherwise perfectly valid input.