c++ - Merge Sort and Queue -


im working on review sheet pretty got except not sure these two. please?

q benefit of using queue merge sort? q suppose in mergesort replace queue stack (i.e. push instead of enqueue, pop in place of dequeue). explain effect replacement have.

with queues things automatically added end of list; thus, when lowest level of mergesort's recursion (individual elements), sorted array can enqueue largest of these elements new list. using stack should reverse list since elements added put @ front, you'd have search smallest element instead of largest.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -