| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 시바견
- Python
- Class
- 43. Multiply Strings
- DWG
- 30. Substring with Concatenation of All Words
- Decorator
- attribute
- 프로그래머스
- Convert Sorted List to Binary Search Tree
- 109. Convert Sorted List to Binary Search Tree
- LeetCode
- Python Implementation
- kaggle
- 밴픽
- concurrency
- Protocol
- 315. Count of Smaller Numbers After Self
- Substring with Concatenation of All Words
- data science
- Generator
- iterator
- 컴퓨터의 구조
- 운영체제
- Python Code
- t1
- Regular Expression
- 파이썬
- 715. Range Module
- shiba
Archives
- Today
- Total
목록LeetCode 242. Valid Anagram (1)
Scribbling
[C++] LeetCode 242. Valid Anagram
https://leetcode.com/problems/valid-anagram/ class Solution { public: bool isAnagram(string s, string t) { if (s.size() != t.size()) { return false; } unordered_map map1; unordered_map map2; for (auto c : s) { map1[c]++; } for (auto c : t) { map2[c]++; } for (auto x : map1) { if (x.second != map2[x.first]) { return false; } } return true; } };
Computer Science/C++
2023. 8. 18. 05:15