mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			836 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			836 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定两个字符串 <code>s</code> 和 <code>t</code> ,编写一个函数来判断 <code>t</code> 是否是 <code>s</code> 的 <span data-keyword="anagram">字母异位词</span>。</p>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
<p><strong>示例 1:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>输入:</strong> s = "anagram", t = "nagaram"
 | 
						|
<strong>输出:</strong> true
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong>示例 2:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>输入:</strong> s = "rat", t = "car"
 | 
						|
<strong>输出: </strong>false</pre>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
<p><strong>提示:</strong></p>
 | 
						|
 | 
						|
<ul>
 | 
						|
	<li><code>1 <= s.length, t.length <= 5 * 10<sup>4</sup></code></li>
 | 
						|
	<li><code>s</code> 和 <code>t</code> 仅包含小写字母</li>
 | 
						|
</ul>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
<p><strong>进阶: </strong>如果输入字符串包含 unicode 字符怎么办?你能否调整你的解法来应对这种情况?</p>
 |