摘要: Notes: Lots of places need to be remember: Edge cases: 1. Only one word, still need to be calculated as it represents. 2. All unique chars that not be 阅读全文
posted @ 2017-09-05 17:15 keepshuatishuati 阅读(122) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int minCostII(int[][] costs) { if (costs.length == 0) { return 0; } int prevMin = 0; int prevSecMin = 0; int p... 阅读全文
posted @ 2017-09-05 16:12 keepshuatishuati 阅读(106) 评论(0) 推荐(0) 编辑
摘要: /* The read4 API is defined in the parent class Reader4. int read4(char[] buf); */ public class Solution extends Reader4 { /** * @param buf Destination buffer * @param n Maximu... 阅读全文
posted @ 2017-09-05 14:02 keepshuatishuati 阅读(89) 评论(0) 推荐(0) 编辑
摘要: class Solution { public List fullJustify(String[] words, int maxWidth) { List result = new ArrayList(); if (words.length == 0) { return result; } int i... 阅读全文
posted @ 2017-09-05 12:38 keepshuatishuati 阅读(101) 评论(0) 推荐(0) 编辑