6

TL;DR
Record (right-left)/length for each pair of consecutive elements.
Once this is done, take these actions. Don't update quotients:
Increment right and decrement left for (0, .3)
Remove from the array at >=.3
Print both elements for >.5
Print the remaining array. Have some separator for e...