improve set matrix zeroes (use constant space)