Question: There is a question asking whether taking a minimum element from a min-heap is o(logn) time, I thought it was false because it takes constant time because the minimum element is on the top. But the answer is true and the instructor's explanation is that constant time is also of O(logn), it was a wording issue. I am quite confused. So in practice, do we consider constant time a runtime of O(logn)?

Answer: 
It is true that anything that is O(1) is O(log n). However, it is not true that everything that is O(log n) is O(1). O is an upper bound, so you can always use a faster-growing function.

Think of it like this:

* Mickey Mouse is a mouse
* All mice are mammals
* Hence, Mickey Mouse is a mammal
* ... but "mice" and "mammals" are not synonymous
Taking the minimum element from a min-heap is an O(log n) operation because it consists of two steps:

1. Getting the minimum item which, as you point out, is O(1) because it's known to be at the top of the heap.
2. Removing the minimum item. This is O(log n) because it involves moving the last item from the heap to the root, and then sifting it down to readjust the heap.

If you just want to get the minimum item without removing it, then the operation is indeed O(1). But any time you want to modify the heap (and removing the first item certainly qualifies), it's an O(log n) operation.

**Nitpickers note**:
I understand the argument that inserting into a min-heap is, *on average*, an O(1) operation. Whereas that can be true in some situations, the worst case is still O(log n). (Try inserting values into a heap in reverse order. Every insertion is O(log n).)