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).
If 64x3 - 343y3 = (4x - Ay) X (Bx2 + 49y2 + Cxy), then find the value of 3 X (2A + 6B) - 2C.
If a + b + c = 8, a² + b² + c² = 18 and ab + b c+ ca = 12, then what is the value of a³ + b³ +c³ –3abc?
If Â
 = 4 then Â
(a + 7)2 + (b – 2) 2 + (c + 3) 2 = 0, then find the value of 3a - 2b + c.
Two positive numbers differ by 2, and the sum of their reciprocals is 3/4. What is the larger number?
(x + 1)2 + (y – 3) 2 + (z + 5) 2 = 0, then find the value of 2x + 3y - z.
If x + 1/x = 5, then x2 + 1/x2 is:
(x – 6) 2 + (y + 2) 2 + (z – 4) 2 = 0, then find the value of 4x - 3y + z.
22% of ‘x’ is equal to 66% of ‘y’, then find the value of x: y.