From 47ce740d3ccaa4975a71782791d254315fef2550 Mon Sep 17 00:00:00 2001 From: Sri Hari Date: Thu, 3 Oct 2024 23:15:52 +0530 Subject: [PATCH] Added comment for Time Complexity with more than one var --- articles/anagram-groups.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/articles/anagram-groups.md b/articles/anagram-groups.md index 1cce9924e..251b2e043 100644 --- a/articles/anagram-groups.md +++ b/articles/anagram-groups.md @@ -92,6 +92,8 @@ public class Solution { * Time complexity: $O(m * n \log n)$ * Space complexity: $O(m * n)$ +> Where $m$ is the number of strings and $n$ is the length of the longest string. + --- ## 2. Hash Table @@ -202,4 +204,6 @@ public class Solution { ### Time & Space Complexity * Time complexity: $O(m * n)$ -* Space complexity: $O(m)$ \ No newline at end of file +* Space complexity: $O(m)$ + +> Where $m$ is the number of strings and $n$ is the length of the longest string. \ No newline at end of file