mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	国外版
This commit is contained in:
		
							
								
								
									
										22
									
								
								算法题(国外版)/valid-anagram.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								算法题(国外版)/valid-anagram.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<p>Given two strings <code>s</code> and <code>t</code>, return <code>true</code> <em>if</em> <code>t</code> <em>is an anagram of</em> <code>s</code><em>, and</em> <code>false</code> <em>otherwise</em>.</p>
 | 
			
		||||
 | 
			
		||||
<p>An <strong>Anagram</strong> is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.</p>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Example 1:</strong></p>
 | 
			
		||||
<pre><strong>Input:</strong> s = "anagram", t = "nagaram"
 | 
			
		||||
<strong>Output:</strong> true
 | 
			
		||||
</pre><p><strong>Example 2:</strong></p>
 | 
			
		||||
<pre><strong>Input:</strong> s = "rat", t = "car"
 | 
			
		||||
<strong>Output:</strong> false
 | 
			
		||||
</pre>
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Constraints:</strong></p>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
	<li><code>1 <= s.length, t.length <= 5 * 10<sup>4</sup></code></li>
 | 
			
		||||
	<li><code>s</code> and <code>t</code> consist of lowercase English letters.</li>
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
<p> </p>
 | 
			
		||||
<p><strong>Follow up:</strong> What if the inputs contain Unicode characters? How would you adapt your solution to such a case?</p>
 | 
			
		||||
		Reference in New Issue
	
	Block a user