Implement a list-based data structure that performs inserts and deletes in constant time.
Anonimo
Use a list to store the items, use a dictionary to store the indices of each item in the list. Perform deletes by swapping the item at the end for the item to be deleted, and then truncating the list by 1 item.