3 ms·
I’m trying to figure out a key constraint. Does the problem statement assume a fixed-length pre-allocated array?
by xpe 2y ago
I’m trying to figure out a key constraint. Does the problem statement assume a fixed-length pre-allocated array?
- chongli 2y agoNo, it doesn’t assume an array at all. It’s a data structure that maintains a totally ordered set with 3 operations: insert(X), delete(X), label(X) Where label extracts the label of element X (which had previously been inserted but not deleted). The label is a number from 0 to n-1, where n is the number of elements currently stored.