javascript 3 lines solution


  • 0
    Z
    var rtn = 0;    nums = nums.join('').split('0');
    for(var i in nums) rtn = Math.max(rtn,nums[i].length);
    return rtn;

Log in to reply
 

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