mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定一份单词的清单,设计一个算法,创建由字母组成的面积最大的矩形,其中每一行组成一个单词(自左向右),每一列也组成一个单词(自上而下)。不要求这些单词在清单里连续出现,但要求所有行等长,所有列等高。</p>
 | 
						|
 | 
						|
<p>如果有多个面积最大的矩形,输出任意一个均可。一个单词可以重复使用。</p>
 | 
						|
 | 
						|
<p><strong>示例 1:</strong></p>
 | 
						|
 | 
						|
<pre><strong>输入:</strong> <code>["this", "real", "hard", "trh", "hea", "iar", "sld"]</code>
 | 
						|
<strong>输出:
 | 
						|
</strong><code>[
 | 
						|
   "this",
 | 
						|
   "real",
 | 
						|
   "hard"</code>
 | 
						|
]</pre>
 | 
						|
 | 
						|
<p><strong>示例 2:</strong></p>
 | 
						|
 | 
						|
<pre><strong>输入:</strong> <code>["aa"]</code>
 | 
						|
<strong>输出: </strong>["aa","aa"]</pre>
 | 
						|
 | 
						|
<p><strong>说明:</strong></p>
 | 
						|
 | 
						|
<ul>
 | 
						|
	<li><code>words.length <= 1000</code></li>
 | 
						|
	<li><code>words[i].length <= 100</code></li>
 | 
						|
	<li>数据保证单词足够随机</li>
 | 
						|
</ul>
 |