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
Post a Comment