You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Triplets
You are viewing a single comment's thread. Return to all comments →
This is the solution but I need a Efficient one
Time complexity is too high