Leetcode - Group Anagrams (Python)

preview_player
Показать описание
Leetcode Blind Curated 75
Leetcode - Group Anagrams

Solving and explaining the essential 75 Leetcode Questions
Рекомендации по теме
Комментарии
Автор

sir, we can just skip the last for loop.
instead return loopup.values() also works

balasagargoud
Автор

big video upload today Tim! keep it up! i'll be tackling blind 75 with ya

janmichaelaustria
Автор

can you add the time and space complexity review for this code. I see that your using sort method inside a forloop, is that acceptable in terms of efficiency ? Im guessing the time complexity here is n * log(k) where k is the length of the string ? I need help understanding that. In some cases, people use ASCII to kind of encode the anagram. Which did not use sort() isnide a forloop which made the time complexity log of n. Can you explain this stuff ?

geld
Автор

ans =
for i in strs:

return ans.values()

siddharthsingh
Автор

What is the time complexity of this code?

umlulita
welcome to shbcf.ru