0 0 votes closed as a duplicate of: MADEASY TESTSERIES DS IS IT CORRECT…?? Data Structures + – Vikas123 1.0k views comment Share Follow Print See all 6 Comments 6 6 Comments reply Sayan Bose commented Dec 27, 2018 i moved by Sayan Bose Dec 28, 2018 reply Follow flag 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 0 replyShare Shobhit Joshi commented Dec 28, 2018 reply Follow flag @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 0 replyShare Shobhit Joshi commented Dec 28, 2018 reply Follow flag Heap should be the answer.https://en.m.wikipedia.org/wiki/Priority_queue 0 0 replyShare Shaik Masthan commented Dec 28, 2018 reply Follow flag 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 1 replyShare Shaik Masthan commented Dec 28, 2018 reply Follow flag @Vikas123 Please type the question instead of screenshot ! Moreover first check for duplicates, most of Madeeasy questions are already posted here :) 0 0 replyShare Vikas123 commented Dec 28, 2018 reply Follow flag ok brother... 0 0 replyShare Please log in or register to add a comment.