[ 내적 ]
https://programmers.co.kr/learn/courses/30/lessons/70128
내적이란 ? 한 벡터를 다른 벡터로 정사영 시켜서, 그 벡터의 크기를 곱한다
각 배열의 같은 배열 인덱스에 위치한 수 끼리 곱하여 그 값을 모두 answer에 더해준다
class Solution {
public int solution(int[] a, int[] b) {
int answer = 0;
for(int i=0; i<a.length; i++) {
answer += a[i]*b[i];
}
return answer;
}
}