Question
What is the typical time complexity for removing the
highest-priority element (using poll()) from a java.util.PriorityQueue with N elements?   import java.util.PriorityQueue;   public class HeapQuestion4 {     public static void main(String[] args) {       PriorityQueue pq = new PriorityQueue();       pq.add(10); pq.add(5); pq.add(20); // Assume pq contains N elements       pq.poll(); // What is the time complexity of this operation?     }   }Solution
When the highest-priority element (root) is removed from a binary heap (poll() or remove()), the last element in the heap is moved to the root's position. To restore the heap property, this new root element then "bubbles down" (or "heapifies down") by repeatedly swapping with its smallest (or largest, for max-heap) child until its correct position is found. Similar to insertion, this process involves traversing a path from the root to a leaf, which is proportional to the height of the heap. Since the height is O(log N), the time complexity for removal is O(log N).
In the following question select the answer pair that expresses a relationship most similar to that expressed in the capitalised pair.
- Select the most appropriate ANTONYM of the bold word in the given sentence.
The soldiers displayed immense courage on the battlefield.
... - Choose the word that is most similar in meaning to the bold word.
The ephemeral nature of life reminds us to appreciate each moment.
... The journalist was censured by the authorities for her controversial report.
9.  1)Embellish       2)Admonish        3)Decorate          Â
   4)Adorn         5)...
Select the option that is NOT an antonym of a word by way of adding the prefix 'in-'.
Select the most appropriate synonym of the given word.
Apposite
Which of the following is an antonym of "vague"?
Select the word that is opposite in meaning to the given word.
ELABORATE
Choose the correctly spelled word.