일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 파이썬
- 프로그래머스
- iterator
- 43. Multiply Strings
- 밴픽
- Protocol
- data science
- 30. Substring with Concatenation of All Words
- Regular Expression
- 315. Count of Smaller Numbers After Self
- 시바견
- Class
- Python Implementation
- LeetCode
- DWG
- concurrency
- Generator
- Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- t1
- shiba
- Decorator
- Python Code
- Python
- kaggle
- Substring with Concatenation of All Words
- 운영체제
- 109. Convert Sorted List to Binary Search Tree
- attribute
- 715. Range Module
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