Compare the Triplets

  • + 0 comments

    My c# sol:

     public static List<int> compareTriplets(List<int> a, List<int> b)
        {
            int AliceScore =0;
            int BobScore =0;
            for (int i=0;i<3;i++)
            {
                if (a[i] > b[i]) 
                AliceScore++;
                else if (a[i] < b[i])
                BobScore++;
            }
            return new List<int> { AliceScore, BobScore};
    
        }
    
    }