class Solution { public ListfullJustify(String[] words, int maxWidth) { List res=new ArrayList (); int idx=0; while(idx 0) { sb.append(" "); extra--; } } sb.append(words[i-1]); res.add(sb.toString()); } idx=i; } return res; }}
本文共 553 字,大约阅读时间需要 1 分钟。
class Solution { public ListfullJustify(String[] words, int maxWidth) { List res=new ArrayList (); int idx=0; while(idx 0) { sb.append(" "); extra--; } } sb.append(words[i-1]); res.add(sb.toString()); } idx=i; } return res; }}
转载于:https://www.cnblogs.com/asuran/p/7594772.html