You are viewing a single comment's thread. Return to all comments →
public static string twoArrays(int k, List<int> A, List<int> B) { int[] a_arr = A.Order().ToArray(); int[] b_arr = B.OrderDescending().ToArray(); for(int i = 0; i < a_arr.Length; i++){ if(a_arr[i] + b_arr[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 →