Answers for "how to check two arrays are equal in python"

5

check if numpy arrays are equal

(A==B).all()
Posted by: Guest on July-23-2020
-1

equal elements in two arrays in c++

bool equalelementsintwoarrays(int A[], int B[], int N) {
    sort(A, A+N);
    sort(B, B+N);
    int i = 0, j = 0;
    while (i < N && j < N) {
        if (A[i] == B[j]) return true;
        else if (A[i] > B[j]) j++;
        else i++;
    }
    return false;
}
Posted by: Guest on July-01-2020

Code answers related to "how to check two arrays are equal in python"

Python Answers by Framework

Browse Popular Code Answers by Language