

 Function speedDis2

    line 5 / 9
    1 + max(0, (x + 1 + -z)) + max(0, (n - x)) + max(0, (n - x))
    O(n^1)

Total Complexity: O(n^1)
