---
title: "Discussion on \"Problem 49. Group Anagrams [Medium] - Hash Maps\" | Hashnode"
description: "Discussion on \"Problem 49. Group Anagrams [Medium] - Hash Maps\". Description\nGiven an array of strings strs, group the anagrams together. You can return the answer in any order.\nFirst Solution [Time: O(n*k), Space O(n*k)]\ndef groupAnagrams(self, strs: List[str]) -> List[List[str]]:\n        # initialise hash map\n  ..."
url: "https://hashnode.com/posts/problem-49-group-anagrams-medium-hash-maps/685a16181aeddb1f0bdfa2b4"
---

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

Discussion

# [Problem 49. Group Anagrams \[Medium\] - Hash Maps](https://learncodedaily.hashnode.dev/problem-49-group-anagrams-medium-hash-maps?utm_source=hashnode&utm_medium=feed)

Description Given an array of strings strs, group the anagrams together. You can return the answer in any order. First Solution \[Time: O(n\*k), Space O(n\*k)\] def groupAnagrams(self, strs: List\[str\]) -> List\[List\[str\]\]: # initialise hash map ...

Jun 24, 2025 · 1 min read · learncodedaily.hashnode.dev  
Read the article

## Written by

[Michael Peattie](https://hashnode.com/@physics2comp)

@physics2comp

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
