https://programmers.co.kr/learn/courses/30/lessons/12987
첫번째 시도
import java.util.*;
class Solution {
public int solution(int[] A, int[] B) {
Arrays.sort(A);
Arrays.sort(B);
int answer = 0;
int indexA = 0;
for(int i = 0; i < B.length; i++){
for(int j = indexA; j < A.length; j++){
if(B[i] > A[j]){
answer++;
indexA = j+1;
break;
}
}
}
return answer;
}
}
성공!