### Question:
ArrayPractice { public int leastBricks(List<List<Integer>> wall) { HashMap<Integer, Integer> maxMap = new HashMap<>(); int maxValue = 0; int maxKey = 0; for (List<Integer> param : wall) { int sum = 0; for (Integer p : param) { sum += p; if (maxMap.containsKey(sum)) { maxMap.put(sum, maxMap.get(sum) + 1); } else { maxMap.put(sum, 1); } } } for (Map.Entry<Integer, Integer> entry : maxMap.entrySet()) { maxKey = Math.max(maxKey, entry.getKey()); } maxMap.put(maxKey, 0); for (Map.Entry<Integer, Integer> entry : maxMap.entrySet()) { maxValue = Math.max(maxValue, entry.getValue()); } int total = wall.size(); return total - maxValue; }  static void main1(String[] args); static void main2(String[] args); int leastBricks(List<List<Integer>> wall);  }### Answer:
@Test public void go() { ArrayPractice arrayPractice = new ArrayPractice(); for (int i = 0; i < cases.size(); i++) { assertEquals((int) result.get(i), arrayPractice.leastBricks(cases.get(i))); } }