Learn to build a data structure that supports insert, remove, and getRandom operations in constant time, even with duplicates allowed.