You are viewing a single comment's thread. Return to all comments →
**Shortest Python Solution **
s = set(arr) c = 0 for i in range(len(arr)-2): if arr[i] in s and arr[i]+d in s and arr[i]+(d*2) in s : c += 1 return c
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 →
**Shortest Python Solution **