Skip to content

Commit afd8499

Browse files
committed
feat: add solution "Valid-Anagram".
1 parent 189d212 commit afd8499

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Given two strings s and t, return true if t is an anagram of s, and false otherwise.
2+
//
3+
// An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
4+
//
5+
//
6+
//
7+
// Example 1:
8+
//
9+
// Input: s = "anagram", t = "nagaram"
10+
// Output: true
11+
// Example 2:
12+
//
13+
// Input: s = "rat", t = "car"
14+
// Output: false

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717

1818
## Problems
1919

20-
| # | Title | Solution | Time | Space | Difficulty |
21-
| --- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------ | ------ | ---------- |
22-
| 217 | [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [Typescript](./Arrays-and-Hashing/Easy/Contains-Duplicate/Contains-Duplicate-Sol.ts) | _O(n)_ | _O(n)_ | Easy |
20+
| # | Title | Solution | Time | Space | Difficulty |
21+
| --- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------ | ------ | ---------- |
22+
| 217 | [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [Typescript](./Arrays-and-Hashing/Easy/Contains-Duplicate/Contains-Duplicate-Sol.ts) | _O(n)_ | _O(n)_ | Easy |
23+
| 242 | [Valid Anagram](https://leetcode.com/problems/valid-anagram/description/) | [Typescript](./Arrays-and-Hashing/Easy/Valid-Anagram/Valid-Anagram-Sol.ts) | _O(n)_ | _O(n)_ | Easy |
2324

2425
## Practice questions
2526

0 commit comments

Comments
 (0)