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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -