Skip to content

Commit

Permalink
이슈 #314에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
1 parent d076943 commit f7e24b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Programmers/중복된_숫자_개수.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <string>
#include <vector>
#include <unordered_map>

using namespace std;

int solution(vector<int> array, int n) {
unordered_map<int, int> m;
for (int num : array) {
m[num]++;
}

return m[n];
}

0 comments on commit f7e24b7

Please sign in to comment.