InterviewSolution
Saved Bookmarks
| 1. |
What is merge sort? What is the Time & Space Complexity for merge sort? |
|
Answer» Merge Sort is a Divide & Conquer algorithm that is used to sort a given INPUT (can be an ARRAY or linked list). It involved dividing the input into 2 halves at each step until input has only 1 element and then merging these sorted halves to finally get a sorted input. Merge sort is not an in-place algorithm (which means you NEED to use extra SPACE for sorting the input).
|
|