calculate product of all integer except the current index, two more approaches