Ad
  • Custom User Avatar

    I voted for clever, because this scales with the interval lengths, not the count of the intervals. So if you want to have large intervals, this can be slow:
    echo sum_intervals([[0, 40000000]]);

    Yet readability is A+ :)