about | help | code help+videos | done | prefs |
generate2D
Given two integers (say n and p), return a homogenous ArrayList of ArrayList of Integer objects such that it holds n ArrayLists, each containing p zeroes. generate2D(2, 3) → [[0, 0, 0], [0, 0, 0]] generate2D(3, 2) → [[0, 0], [0, 0], [0, 0]] generate2D(1, 5) → [[0, 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: 5 Post-solution available
Copyright Nick Parlante 2017 - privacy