You are viewing a single comment's thread. Return to all comments →
This is how Java works
static String twoArrays(int k, int[] a, int[] b) { Arrays.sort(a); Arrays.sort(b); int j = b.length - 1; for (int i=0;i<a.length && i < j;i++){ if (a[i] + b[j] < k) return "NO"; j--; } return "YES"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Permuting Two Arrays
You are viewing a single comment's thread. Return to all comments →
This is how Java works