/** Remove and return the smallest element return null if list is empty) */ public E extract() { if (size() == 0) return null; E temp= get(0); // smallest value is at root set(0, get(size() – 1)); // move last element to the root setSize(size() - 1); // reduce size by 1 bubbleDown(0); return temp; } 49 extract()
{}