0 votes 0 votes IN THE VIA HEAP LIST WHY IT IS O(LOGN) FOR SEARCHING?? eyeamgj asked Oct 7, 2018 eyeamgj 920 views answer comment Share Follow See all 25 Comments See all 25 25 Comments reply Show 22 previous comments Gupta731 commented Dec 24, 2018 reply Follow Share Sorry, but all these days I have studied and told by the faculties that heap is an efficient way to implement a priority queue. Even it is mentioned in wiki. This answer is conflicting with my concepts. How a sorted array is better for a priority queue? 0 votes 0 votes Shaik Masthan commented Dec 24, 2018 reply Follow Share Insertion, Deletion and Searching respectively, SORTED ARRAY :- O(n),O(1) and O(log n) Heaps :- O(log n), O(log n) and O(n) clearly we can observe in one operation, O(1) is better choice than O(log n). 1 votes 1 votes Gupta731 commented Dec 25, 2018 reply Follow Share Got it, Thanks 0 votes 0 votes Please log in or register to add a comment.