You are viewing a single comment's thread. Return to all comments →
C#
string twoArrays(int k, List<int> A, List<int> B) { A.Sort(); B.Sort(); for (int i = 0; i < A.Count; i++) { if (A[i] + B[B.Count - 1 - i] < k) return "NO"; } 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 →
C#