No rule says that arrays must be completely loaded on RAM; even more so in Google, where they probably have to spread them over thousands of machines. No excuse, sorry.
if (a[i] < a[j])
That says that that array is completely loaded in your address space. :-)