We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0aeaed commit 9f07a44Copy full SHA for 9f07a44
sorting/merge_sort.go
@@ -10,6 +10,9 @@
10
arrays and compare their elements. We add the smaller element to the result array and move the corresponding index variable.
11
Finally, we append the remaining elements of the left or right array to the result array and return it.
12
13
+ The time complexity of Merge Sort is O(n*log n), where n is the number of elements in the array,
14
+ and the space complexity is O(n) due to the use of the temporary arrays during the merging phase.
15
+
16
*/
17
package main
18
0 commit comments