---
title: "Discussion on \"LeetCode: Valid Anagram\" | Hashnode"
description: "Discussion on \"LeetCode: Valid Anagram\". Problem:\nhttps://leetcode.com/problems/valid-anagram/description/\nCode:\nclass Solution:\n    def isAnagram(self, s: str, t: str) -> bool:\n        return Counter(s) == Counter(t)\n\n# class Solution:\n#     def isAnagram(self, s: str, t: str) -> bool:\n#  ..."
url: "https://hashnode.com/posts/leetcode-valid-anagram/693c01716140cd251c7ba96b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode: Valid Anagram](https://is-power-of-two.hashnode.dev/leetcode-valid-anagram?utm_source=hashnode&utm_medium=feed)

Problem: https://leetcode.com/problems/valid-anagram/description/ Code: class Solution: def isAnagram(self, s: str, t: str) -> bool: return Counter(s) == Counter(t) # class Solution: # def isAnagram(self, s: str, t: str) -> bool: # ...

Dec 12, 2025 · 2 min read · is-power-of-two.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#counter](https://hashnode.com/tag/counter)

## Written by

[Shahwar Alam Naqvi](https://hashnode.com/@shahwar01)

@shahwar01

  
[View profile](https://hashnode.com/@shahwar01)

Coder

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
