We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 754fa31 commit 131a270Copy full SHA for 131a270
src/_Problems_/product-of-elements/index.js
@@ -1,5 +1,13 @@
1
// An array such that each index has a product of all the numbers in the array except the number stored at that index.
2
3
+/**
4
+ * Input - [1, 2, 3, 4]
5
+ * Output - [24, 12, 8, 6]
6
+ *
7
+ * Input - [0, 1, 3, 5]
8
+ * Output - [15, 0, 0, 0]
9
+ */
10
+
11
function findProduct(arr) {
12
let left = 1;
13
const result = [];
0 commit comments