You are viewing a single comment's thread. Return to all comments →
Python solution:
def twoArrays(k, A, B): # Write your code here for a in A: low = k-a bs = [b for b in B if b >=low] if bs: #if bs not empty B.remove(min(bs)) else: # if bs empty 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 solution: