Pre-computation
When the computational algorithm that is to be applied to a sub-array of the array is involved or complex, it can be advantageous to take advantage of pre-computation. This can take the shape of prefix/suffix operation or using hashing.