about | help | code help+videos | done | prefs |
Write a method that accepts two identical length arrays of integers 'nums1' and 'nums2' and returns a new array that contains the PRODUCT of the corresponding elements of those arrays. What this means is that the i-th element of the resulting array is the product of the i-th element in 'nums1' and the i-th element in 'nums2'. Preconditions: You may assume that 'nums1' and 'nums2' are the same length (which could be zero). Look at the test data for examples. quiz2023_12_13_APP1SLHL_combineProduct([4], [5]) → [20] quiz2023_12_13_APP1SLHL_combineProduct([-3], [2]) → [-6] quiz2023_12_13_APP1SLHL_combineProduct([40, 0, 18], [0, 17, 0]) → [0, 0, 0] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy