Array238ProductOfArrayExceptSelf

来源:互联网 发布:支付宝与淘宝的关系 编辑:程序博客网 时间:2024/06/03 06:21

思路1: Use Division O(n)

  • Failed case 1 [0, 2, 4]
    • Didn’t consider ZERO in the array
  • Failed Case 2: [2, 0, 4, 0, 4]
    • Didn’t consider multiple ZERO in the array
    • Find that if multiple zeros, the output should be all zero
0 0
原创粉丝点击