Maintain a dynamic collection of numbers through a series of add and remove queries. After each query, count the number of unique triplets (a, b, c) currently in the collection such that a - b = b - c…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.