You are viewing a single comment's thread. Return to all comments →
def twoArrays(k, A, B): diffs = sorted([(k - n) for n in B if n < k], reverse=True) sorted_A = sorted(A, reverse=True) return "YES" if all(x <= y for x, y in zip(diffs, sorted_A)) 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 →