Compare the Triplets

  • + 0 comments

    IN C++;

    vector compareTriplets(vector a, vector b) { int alice=0; int bob=0;

    for(int i=0;i<3;i++)    
    {
        if(a[i]>b[i])
        {
            ++alice;
        }
        else if(a[i]<b[i]){
            ++bob;
        }
    }
    return {alice,bob};
    

    }