Optimize zero-indexed selection