• + 0 comments

    This is the solution but I need a Efficient one

    def solve(s):
        j=0
        for i in set(combinations(s,3)):
            if(i[0]<i[1] and i[1]<i[2]):
                j+=1
        return j
    

    Time complexity is too high