a)http://cs.stackexchange.com/questions/27860/whats-the-difference-between-a-binary-search-tree-and-a-binary-heap
b)No always O(N) time not possible. Because heap is not always a sorted sequence.So for getting sorted sequence we first make it sorted order, which takes minimum O(N log N) time.
64.3k questions
77.9k answers
244k comments
80.0k users