摘要: Given a matrix (H × W) which contains only 1 and 0, find the area of the largest square matrix which only contains 0s. Input 1,1 1,2 2,1 2,2 In the fi 阅读全文
posted @ 2018-04-02 20:44 晓风微微 阅读(229) 评论(0) 推荐(0) 编辑
摘要: You have N items that you want to put them into a knapsack. Item i has value vi and weight wi. You want to find a subset of items to put such that: Th 阅读全文
posted @ 2018-04-02 20:05 晓风微微 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Find the minimum number of coins to make change for n cents using coins of denominations d1, d2,.., dm. The coins can be used any number of times. Inp 阅读全文
posted @ 2018-04-02 19:52 晓风微微 阅读(242) 评论(0) 推荐(0) 编辑