Efficiently calculate Variable Length Subnet Masks.
Note: VLSM requires sorting by size, which is done automatically.