GoLang Solution For LeetCode Problem: Filling Bookcase Shelves
Solving Filling Bookcase Shelves in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Return the minimum possible height that the total bookshelf can be after placing shelves in this manner.
Input: books = [[1,1],[2,3],[2,3],[1,1],[1,1],[1,1],[1,2]], shelf_width = 4 Output: 6 Explanation: The sum of the heights of the 3 shelves are 1 + 3 + 2 = 6. Notice that book number 2 does not have to be on the first shelf.
1 <= books.length <= 1000
1 <= books[i] <= shelf_width <= 1000
1 <= books[i] <= 1000
See the full details of the problem Filling Bookcase Shelves at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go