5 ms·
A double array takes O(1) more space in Java vs. C, so running out of memory wouldn't be a problem.
by lern_too_spel 7y ago
A double array takes O(1) more space in Java vs. C, so running out of memory wouldn't be a problem.
- saagarjha 7y agoUnfortunately big-O algorithmic analysis doesn't translate cleanly to the real world due to constants and other inefficiencies.
- lern_too_spel 7y agoIt does in this case. Champtar says it's something about the size of the matrix that makes it run out of space. The overhead of the double array is already paid for.