โ† Directi questions
CodingReported in a candidate post, Jul 2025

Design a data structure with O(1) minimum gap and O(logn) operations

Filed under Directi

The question

Design a custom data structure supporting Insert(x), Delete(x), and Search(x) in O(logn) time, and a mingap() operation in O(1) time, where mingap is the minimum absolute difference between any two elements.

No write-up yet. Related questions below have one.

Related Directi questions

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