4 ms·
Not in java (arrays can only be indexed by a signed 32 bit integer) and the C++ solution works exactly the same way with the full 64 bit data types. That much s
by haimez 10y ago
Not in java (arrays can only be indexed by a signed 32 bit integer) and the C++ solution works exactly the same way with the full 64 bit data types. That much should be obvious, and if you think you might legitimately exceed two billion elements in the array you're sorting- you'd be a fool to rely on someone else's sort implementation.
- Retric 10y agoJava uses shorts in some JavaCard implementations. So, it's clearly just a legacy limitation which will eventually be removed. As to C++ 2+ billion byte arrays are not uncommon. It's just a few gigs of ram for int[] arrays.