I find this one weird and unintuitive to read index starts at i which itself is being incremented.
But maybe it just doesnt match my way of thinking (recursively)