Coding
코딩 인터뷰 퀘스천 완전 분석 - Valid Anagram
Daily Coding
2020. 10. 27. 09:47
[LeetCode] [Easy] 242. Valid Anagram
leetcode.com/problems/valid-anagram/
Valid Anagram - 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
Anagram 확인하기
문자열안에 있는 문자들이 순서가 바껴서 나오는 문자열이 Anagram이라고 한대요.
소문자로만 이루어져있다고 해서 길이 26인 배열을 만들어서 카운트해주고 그 갯수를 비교해줬어요.
그럭 저럭한 속도네요.
배열 길이를 늘려서 계산을 줄여주는걸로 속도를 높였네요. 또 하나 배워갑니다.