코딩테스트/[C#] 프로그래머스
[프로그래머스 | Lv.0] 배열의 유사도
냠냠쿠
2023. 8. 13. 19:29
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120903

📝 나의 풀이
using System;
public class Solution {
public int solution(string[] s1, string[] s2) {
int answer = 0;
for(int i=0; i<s1.Length; i++){
for(int j=0; j<s2.Length; j++){
if(s1[i]==s2[j]){
answer++;
}
}
}
return answer;
}
}
728x90