You are viewing a single comment's thread. Return to all comments →
My Python 3 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" return "YES"
Some coders use a for loop instead of any. Is it more or less efficient to use any?
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 →
My Python 3 solution:
Some coders use a for loop instead of any. Is it more or less efficient to use any?