Compare the Triplets

  • + 0 comments

    This is how I did it in python

    def compareTriplets(a, b):
        b_points = 0
        a_points = 0
        if len(a) != len(b):
            return
        for i in range(len(a)):
            if a[i] > b[i]:
                a_points += 1
            elif a[i] < b[i]:
                b_points += 1
            else:
                continue      
        return [a_points,b_points]