You are viewing a single comment's thread. Return to all comments →
def beautifulTriplets(d, arr): # Write your code here count = 0 lookup = set(arr) for i in arr: num2 = i + d num3 = num2 + d if num2 in lookup and num3 in lookup: count += 1 return count
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Triplets
You are viewing a single comment's thread. Return to all comments →