0 0 votes time complexit..? Q1. to find kth smallest element from a binary heap... a) O(k log k) b) O(k log n) c) O(1) d)O(nk) e) a,b both Q2. Print the biggest K elements in a given heap in O(K*log(K))____________? Q.3 how to determine if the kth largest element of the heap is greater than x____? Algorithms + – yes 1.9k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply yes commented Dec 11, 2015 reply Follow flag http://stackoverflow.com/questions/7650917/oklogk-time-algorithm-to-find-kth-smallest-element-from-a-binary-heap http://stackoverflow.com/questions/11209556/print-the-biggest-k-elements-in-a-given-heap-in-oklogk?lq=1 http://stackoverflow.com/questions/4922648/how-to-determine-if-the-kth-largest-element-of-the-heap-is-greater-than-x?lq=1 please confirm, what should be exact ans?? 0 0 replyShare monanshi commented Dec 11, 2015 reply Follow flag 1. Finding Kth smallest element in min heap would take O(klogn) time. 2. Print biggest K elements in max heap would take O(klogk) time. 3. To determine Kth largest element of the max heap is greater than x would take O(klogk) time. This is similar to question 2. You just have to do additional comparisons. 1 1 replyShare Bishnu Agrawal commented Dec 15, 2015 reply Follow flag Here all comments are O(klogn) for finding kth smallest or largest element in min/max heap respectively. But https://gateoverflow.in/1110/gate2003_23 see this same question but all answers are O(1). Why ? I mean how to take it in exam ? 1 1 replyShare Please log in or register to add a comment.