Permuting Two Arrays

  • + 0 comments

    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

    def permuting_two_arrays(k, A, B):
        A = sorted(A)
        B = sorted(B, reverse=True)
    
        for index in range(0,len(A)):
            if (A[index] + B[index]) < k:
                return "NO"
    
        return "YES"