I would multiply all and go through and devide with the indexes value after
2025-07-19 15:44:36
42
Little_Tasty :
I’d find the product of all the numbers in the array then set the value at each index equal to the total product divided by the value at that index
2025-07-20 06:46:55
6
It’s me Mia :
Can’t you just have a single value that is the moltiplications of all the nums in the original array and then the result array for each position would be that number divided by the origial nimber at thata position? Way easier IMO
2025-07-19 15:25:01
5
adam :
It does this in O(N) time correct?
2025-07-19 15:12:42
0
SpaceCadetSEA :
Now do it in O(1) space!
2025-07-19 19:17:22
4
Kindragonrc :
Take array, gain index of self, slice out self, multiply entire remaining array, put answer in new array at index of self. If done in order of array indexing, you get effectively the same as the original answer given. And going in order of indexing, grants the index without need for extra iteration.
2025-07-19 18:37:33
0
罗曼 :
he forgot to mention that division not allowed
2025-07-19 16:46:39
6
Phillip 🇨🇦 :
👍👍👍
2025-07-20 06:58:14
0
Jeremiah Pratt :
Find the Product of all numbers in the array = x. Return originalArray.map(n => x / n).
2025-07-20 03:41:15
0
To see more videos from user @greghogg5, please go to the Tikwm
homepage.