AndurilMachine Learning Engineer · Phone ScreenCodemia practiceImplement Priority Queue with streaming input
Design and implement a priority queue that can handle streaming input, allowing for efficient insertion of elements and retrieval of the highest priority element in O(log n) time. The priority queue should support operations such as insert and extract-max, and should be able to process a continuous stream of incoming data. Ensure that your implementation can handle edge cases, such as empty queues and duplicate priorities.