One insight


  • 0
    Z

    At any two index, if the difference between accumulated numOfZero and numOfOne is the same, what does this tell you?

    -- the number of one and zero between the two index is the same.

    Hope this help you.


Log in to reply
 

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