There is no need to know the entire dataset to calculate "left"
Simplify leftCalculator var names
There is no corner case on the first element