Here’s a rephrased version of the content: ```python def determine_capacity(packages, D): left, right = max(packages), sum(packages) while left mid: cur = 0 day += 1 cur += packages[i] if day > D: left = mid + 1 else: right = mid return left ``` In the second example, we adopt a method similar to the first, but instead of utilizing the `sum` function, we iterate over the packages, adding their weights to the current weight until it surpasses `mid`, which represents the ship's current capacity being evaluated. When it exceeds, we reset the current weight to zero and increment the day counter. We then verify if the number of days exceeds `D` to adjust the binary search range accordingly.