When is it preferable to use merge sort over quicksort?
- Input size
- Memory usage
- Stability of sorting
- Time complexity
Merge sort is preferable over quicksort when dealing with large input sizes due to its guaranteed O(n log n) time complexity, which is advantageous over quicksort's worst-case O(n^2) time complexity.
Loading...
Related Quiz
- The _________ layer of the OSI Model deals with the presentation and encryption of data.
- Describe the working principle of demand paging in virtual memory management.
- Explain the concept of DevOps and its relationship with the SDLC.
- ________ encryption requires the same key to both encrypt and decrypt data, while ________ encryption uses separate keys for these operations.
- Your organization is planning to migrate its infrastructure to a cloud environment. How would you ensure data security and privacy during the migration process?