about | help | code help+videos | done | prefs |
array2D_rowSums
Given a 2D array of integers (1D arrays to build a 2D array from), create a 1D array and fill it up with the sums of each row in the 2D array. Your first two lines of code must be: int[][] arr = {row1, row2, row3}; int[] rowSums = new int[arr.length]; array2D_rowSums([1, 1], [-2, -2], [3, 3]) → [2, -4, 6] array2D_rowSums([-1, 2, 3], [4, -5, 6], [16, 2, -9]) → [4, 5, 9] array2D_rowSums([1], [2], [6]) → [1, 2, 6] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy