If it's just a matter of keeping up with the bounds of the partitions, I can see that being done in constant space.
If it's just a matter of keeping up with the bounds of the partitions, I can see that being done in constant space.