We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 440ebfb commit 24d69d9Copy full SHA for 24d69d9
1 file changed
src/main/java/com/fishercoder/solutions/firstthousand/_238.java
@@ -3,6 +3,11 @@
3
public class _238 {
4
5
public static class Solution1 {
6
+ /**
7
+ * Have two arrays to help out: one array holds all the products of elements to the left of
8
+ * nums[i] the 2nd array holds all the products of elements to the right of nums[i[ then
9
+ * multiply them together.
10
+ */
11
public int[] productExceptSelf(int[] nums) {
12
int[] left = new int[nums.length];
13
left[0] = 1;
0 commit comments