You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
n = int(input()) for _ in range(n): __, k = map(int, input().split()) a = sorted(list(map(int, input().split()))) b = sorted(list(map(int, input().split())), reverse=True) if all([a[i] + b[i] >= k for i in range(len(a))]): print('YES') else: print('NO')
Feel free to ask if you have any questions :)
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 →
Here is Python 3 solution from my HackerrankPractice repository:
Feel free to ask if you have any questions :)