Easy solution C++ O(nlog(n))


#1

int Solution::mice(vector &A, vector &B) {
sort(A.begin(),A.end());
sort(B.begin(),B.end());

int val=0;
    
for(int i=0;i<A.size();i++){
    val = max(val,abs(A[i]-B[i]));
}
return val;

}