0 votes 0 votes closed as a duplicate of: MADEASY TESTSERIES DS IS IT CORRECT…?? Vikas123 asked Dec 27, 2018 closed Dec 28, 2018 by Shaik Masthan Vikas123 393 views comment Share Follow See all 6 Comments See all 6 6 Comments reply Sayan Bose commented Dec 27, 2018 i moved by Sayan Bose Dec 28, 2018 reply Follow Share Yes it is the most efficient as you see. What is your doubt? By the way, change the title to Made Easy DS doubt 0 votes 0 votes Shobhit Joshi commented Dec 28, 2018 reply Follow Share @Sayan Bose how is it the most efficient. When we are implementing priority queue, why would we search any random element in it, we would always search highest or lowest priority. Insertion and deletion would be the heavy operations, for which heap is the better choice So, heap should be answer. 0 votes 0 votes Shobhit Joshi commented Dec 28, 2018 reply Follow Share Heap should be the answer.https://en.m.wikipedia.org/wiki/Priority_queue 0 votes 0 votes Shaik Masthan commented Dec 28, 2018 reply Follow Share When we are implementing priority queue, why would we search any random element in it, while implementing you didn't require, after implementing, now, suddenly i want to change a node priority. Then i have to first search it, right ? 1 votes 1 votes Shaik Masthan commented Dec 28, 2018 reply Follow Share @Vikas123 Please type the question instead of screenshot ! Moreover first check for duplicates, most of Madeeasy questions are already posted here :) 0 votes 0 votes Vikas123 commented Dec 28, 2018 reply Follow Share ok brother... 0 votes 0 votes Please log in or register to add a comment.