1 votes 1 votes Plzzz explain... Chirag arora asked Jan 9, 2018 Chirag arora 627 views answer comment Share Follow See all 14 Comments See all 14 14 Comments reply thepeeyoosh commented Jan 9, 2018 reply Follow Share Is it C Option? 0 votes 0 votes Chirag arora commented Jan 9, 2018 reply Follow Share No...A is given as a answer, 0 votes 0 votes thepeeyoosh commented Jan 9, 2018 reply Follow Share Only two option looking best A and C , so chooses C . Okk but A is answer my reason regarding A is using built heap you can got O(n) 0 votes 0 votes Chirag arora commented Jan 9, 2018 reply Follow Share Ok...thanku...bro! 1 votes 1 votes Anu007 commented Jan 9, 2018 reply Follow Share answer is O(m+n) since m can be , m>>>>n. then time will be O(m) not O(n). 0 votes 0 votes Chirag arora commented Jan 9, 2018 reply Follow Share Can u explain how it is O(m+n) 0 votes 0 votes srestha commented Jan 9, 2018 reply Follow Share @Anu and if m<<n A) will be ans and also say m=1 we can O(n+1)=O(n) 0 votes 0 votes joshi_nitish commented Jan 9, 2018 reply Follow Share and @srestha why are you assuming m<n ? O(m+n) is best option, it will satisfy either if m<n or n<m , but O(n) is not correct if m>n 1 votes 1 votes Chirag arora commented Jan 10, 2018 reply Follow Share Sir can you explain reason behind O(m+n) 0 votes 0 votes joshi_nitish commented Jan 10, 2018 reply Follow Share @Chirag, O(m+n) is a time complexity to apply build heap on m+n elements. 0 votes 0 votes Chirag arora commented Jan 10, 2018 reply Follow Share Sir can you give link for build heap.. 0 votes 0 votes joshi_nitish commented Jan 10, 2018 reply Follow Share see this 0 votes 0 votes Kiran Karwa commented Jan 10, 2018 reply Follow Share @nitish Not necessarily one after another If this was not mentioned in the question. We would take this as inserting each element individually, and its complexity would have been O(mlogn),? 0 votes 0 votes Anu007 commented Jan 10, 2018 reply Follow Share yes.... 0 votes 0 votes Please log in or register to add a comment.