← Visa questions

Count Unique Triplets with Difference

Filed under Visa

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.

Related Visa questions

Collected from public candidate posts and coding forums. Updated Nov 2026.