Permuting Two Arrays

  • + 0 comments

    C# Solution

    A.Sort(); B.Sort(); B.Reverse();

        for (int i = 0; i < A.Count(); i++){
            if(A[i] + B[i] < k){
                return "NO";
            }
        }
    
        return "YES";