Implement a custom data structure in C++ that supports insertion, deletion, and random element retrieval in O(1) time.