Given an array of numbers, replace each number with the
product of all the numbers in the array except the number itself *without* using divisionhttps://www.glassdoor.com/Interview/Given-an-array-of-numbers-replace-each-number-with-the-product-of-all-the-numbers-in-the-array-except-the-number-itself-w-QTN_9132.htm
The key to this solution is construct the accessory arrays which assists the solution. Here are the code
Recursive way
Iterative way:
No comments:
Post a Comment