|
| 1 | +<h2><a href="https://leetcode.com/problems/valid-anagram">Valid Anagram</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><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> |
| 2 | + |
| 3 | +<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> |
| 4 | + |
| 5 | +<p> </p> |
| 6 | +<p><strong class="example">Example 1:</strong></p> |
| 7 | +<pre><strong>Input:</strong> s = "anagram", t = "nagaram" |
| 8 | +<strong>Output:</strong> true |
| 9 | +</pre><p><strong class="example">Example 2:</strong></p> |
| 10 | +<pre><strong>Input:</strong> s = "rat", t = "car" |
| 11 | +<strong>Output:</strong> false |
| 12 | +</pre> |
| 13 | +<p> </p> |
| 14 | +<p><strong>Constraints:</strong></p> |
| 15 | + |
| 16 | +<ul> |
| 17 | + <li><code>1 <= s.length, t.length <= 5 * 10<sup>4</sup></code></li> |
| 18 | + <li><code>s</code> and <code>t</code> consist of lowercase English letters.</li> |
| 19 | +</ul> |
| 20 | + |
| 21 | +<p> </p> |
| 22 | +<p><strong>Follow up:</strong> What if the inputs contain Unicode characters? How would you adapt your solution to such a case?</p> |
0 commit comments