https://school.programmers.co.kr/learn/courses/30/lessons/120583
class Solution {
public int solution(int[] array, int n) {
int answer = 0;
for(int i=0; i < array.length; i++){
if(array[i] == n){ //array ๋ฐฐ์ด์ i๋ฒ์งธ ์์๊ฐ n๊ณผ ๊ฐ๋ค๋ฉด
answer = answer + 1; // answer ๊ฐ 1์ฉ ์ฆ๊ฐ (n์ด ๋ช ๊ฐ ์ธ์ง ์ธ๊ธฐ)
}
}
return answer;
}
}