But before popping the top elements we have to preprocess the heap by building the heap which itself will take NlogN?