Skip to content

Commit

Permalink
Add Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleshot committed Sep 1, 2024
1 parent e1a10c3 commit 50d78f2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Neetcode/Neetcode_150/Group_Anagrams/Group_Anagrams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Neetcode
class Solution:
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
pass
results = []
for i in strs:
for j in range(strs.index(i) + 1, len(strs)):
if sorted(i) == sorted(strs[j]):
results.append([i, strs[j]])
for i in results:
for j in range(len(i) - 1):
if i[j] == i[j + 1]:
print(i[j])
return results

0 comments on commit 50d78f2

Please sign in to comment.