We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Permuting Two Arrays
- Discussions
Permuting Two Arrays
Permuting Two Arrays
Sort by
recency
|
140 Discussions
|
Please Login in order to post a comment
JS Code
function twoArrays(k, A, B) { A = A.sort((a,b)=>a-b); B = B.sort((a,b)=>b-a); console.log('Inputs'+k, A,B); for(let i=0; i < A.length; i++){ if(A[i] + B[i] < k){ return 'NO'; } } return 'YES';
}
Python best solution
If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions
Rust best solution
If you’re looking for solutions to the 3-month preparation kit in either Python or Rust, you can find them below: my solutions