I have the following homework question: You develop a video surveillance software that must run on real-time data. In one of the steps of the algorithm executed with each image captured by the camera, you have to sort some numbers. Considering that the average execution time of QuickSort is better than that of MergeSort, which Sorting should you consider using? justify
I know that QuickSort isn't good with larger dataset as opposed to MergeSort. I also think that because we are working with data that continuously updates speed is incredibly important. But considering that its real-time that means that the size of the data set is small initialy and then grows.
It seems like a trap to go for QuickSort because the question is heavily promoting it. On the other hand MergeSort is more stable it always have a complexity of O(n log n). I don't know which to choose and how to justify it properly.