You are viewing a single comment's thread. Return to all comments →
def twoArrays(k: Int, A: Array[Int], B: Array[Int]): String = if (A.sorted.zip(B.sorted(Ordering.Int.reverse)) .exists { case (a, b) => a + b < k }) "NO" else "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 →