package leetcode;

/**
 * https://leetcode.com/problems/filling-bookcase-shelves/
 */
public class Problem1105 {
    public int minHeightShelves(int[][] books, int shelf_width) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1105 prob = new Problem1105();
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/filling-bookcase-shelves/
 */
public class Problem1105 {
    public int minHeightShelves(int[][] books, int shelf_width) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1105 prob = new Problem1105();
        System.out.println(prob.minHeightShelves(new int[][]{
            {1, 1}, {2, 3}, {2, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 2}
        }, 4)); // 6
    }
}

Update problem 1105