What is the complexity (big-oh) for the remove()
function on the Priority Queue class in Java? I can\'t find anything documented anywhere, I think it\'s O(n), c
According to Oracle documentation: "Implementation note: this implementation provides O(log(n)) time for the enqueing and dequeing methods (offer, poll, remove() and add); linear time for the remove(Object) and contains(Object) methods; and constant time for the retrieval methods (peek, element, and size)."
Link here to Oracle Doc