You are viewing a single comment's thread. Return to all comments →
Python:
def twoArrays(k, A, B): if sum(A)+sum(B)<k*len(A): return "NO" sort_A=sorted(A) sort_B=sorted(B,reverse=True) for i in range(len(A)): if sort_A[i]+sort_B[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 →
Python: