You are viewing a single comment's thread. Return to all comments →
def twoArrays(k, A, B): # Write your code here return "YES" if all(a+b>=k for a,b in zip(sorted(A),sorted(B,reverse=True))) else "NO"
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 →
def twoArrays(k, A, B): # Write your code here return "YES" if all(a+b>=k for a,b in zip(sorted(A),sorted(B,reverse=True))) else "NO"