LeetCode/Grind_70/Valid_Anagram.py

18 lines
498 B
Python

# Given two strings s and t, return true if t is an anagram of s, and false otherwise.
# 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.
class Solution(object):
def __init__(self):
pass
def isAnagram(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return 0
sol = Solution()
print(sol.isAnagram("anagram", "nagram"))