-
LeetCode - 49.Group Anagram알고리즘/알고리즘 문제 복기 2021. 4. 1. 07:31
leetcode.com/problems/group-anagrams/
Group Anagrams - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
Answer
Key는 정렬된 스트링을 써서
anagram이 같은지 확인하는 방식
Answer2
from - https://leetcode.com/problems/group-anagrams/solution/ 각각의 스트링에 26개의 알파벳에 대한 카운트 값의 스트링을 연동시켜서
만약 알파벳의 카운트가 같다면 anagram으로 판별하는 방식
'알고리즘 > 알고리즘 문제 복기' 카테고리의 다른 글
LeetCode - 62. Unique Path (0) 2021.04.02 LeetCode - 56. Merge Intervals (0) 2021.04.01 Leet Code - 48. Rotate Image (0) 2021.03.30 LeetCode - 46. Permutation (0) 2021.03.29 Leet code - 55. Jump Game (0) 2021.03.26