You are viewing a single comment's thread. Return to all comments →
Very simple solution:
def twoArrays(k, A, B): A.sort() B.sort(reverse=True) if (any(a+b<k for a,b in zip(A,B))): return "NO" else: 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 →
Very simple solution: