diff --git a/src/my_project/interviews/google_top_exercises/round_1/14_valid_anagram.py b/src/my_project/interviews/google_top_exercises/round_1/14_valid_anagram.py new file mode 100644 index 00000000..4cee3107 --- /dev/null +++ b/src/my_project/interviews/google_top_exercises/round_1/14_valid_anagram.py @@ -0,0 +1,12 @@ +from collections import defaultdict + +class Solution: + def isAnagram(self, s: str, t: str) -> bool: + + lst_s = [c for c in s] + lst_t = [c for c in t] + + lst_s.sort() + lst_t.sort() + + return lst_s == lst_t \ No newline at end of file