Should refine the wording: it is not constant space, but in place

  • 1

    I find the wording confusing, since usually constant space does mean that your algorithm is not allowed to use space quantity that depends on the size of the input. When modifying the input, we allow the algorithm to use up to O(n) space.
    I suggest the wording should precise that we are allowed to modify the input array.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.