You are viewing a single comment's thread. Return to all comments →
simple very pythonic solution:
def twoArrays(k, A, B): # Write your code here A.sort() B.sort(reverse=True) comprobations = [x + y >= k for x,y in zip(A, B)] return "YES" if all(comprobations) 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 →
simple very pythonic solution: