algorithm - MIN-DEQUEUE structure -


i learning queue implementation. know how implement enqueue , dequeue. came across term min-dequeue (an abstract ds) today. googled exact term couldn't find links explaining min-dequeue is, , same in so. can explain me how design it?.

my idea: extracting minimum element queue = min-dequeue. minimum element must @ front of queue. create tree minimum element @ top , on.

quick note: if silly question please comment so. i'll remove it.

min-queue uses min-heap store data.you can write own compactor function. default in c++ stl if use priority queue default min-queue.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -