Skip to content

Latest commit

 

History

History

068.Text_Justification

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

068.Text_Justification (Hard)

链接

题目:https://leetcode.com/problems/text-justification/
代码(github):https://github.com/illuz/leetcode

题意

给出一些单词和一个宽度,要你把单词打包成宽度一样的字符串数组。
要求:

  1. 每个字符串尽可能包含多个单词,多余的位置用空格代替。
  2. 单词间空格尽量平均,不能平分的话,前面的空格要比后面的多。

分析

就是直接模拟,要注意细节处理。