mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			621 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			621 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>Given two strings,write a method to decide if one is a permutation of the other.</p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p><strong>Example 1:</strong></p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<pre>
 | 
						|
 | 
						|
<strong>Input: </strong><code>s1</code> = "abc", <code>s2</code> = "bca"
 | 
						|
 | 
						|
<strong>Output: </strong>true
 | 
						|
 | 
						|
</pre>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p><strong>Example 2:</strong></p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<pre>
 | 
						|
 | 
						|
<strong>Input: </strong><code>s1</code> = "abc", <code>s2</code> = "bad"
 | 
						|
 | 
						|
<strong>Output: </strong>false
 | 
						|
 | 
						|
</pre>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p><strong>Note:</strong></p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<ol>
 | 
						|
 | 
						|
	<li><code>0 <= len(s1) <= 100 </code></li>
 | 
						|
 | 
						|
	<li><code>0 <= len(s2) <= 100</code></li>
 | 
						|
 | 
						|
</ol>
 | 
						|
 |