[프로그래머스 | Lv.0] 배열의 유사도

이승민·2023년 8월 1일
0

프로그래머스

목록 보기
15/27

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;
    }
}

0개의 댓글

관련 채용 정보