1 Matching Annotations
- Dec 2019
-
www.interviewcake.com www.interviewcake.com
-
So what's our total time cost? O(nlog2n)O(n\log_{2}{n})O(nlog2n). The log2n\log_{2}{n}log2n comes from the number of times we have to cut nnn in half to get down to sublists of just 1 element (our base case). The additional nnn comes from the time cost of merging all nnn items together each time we merge two sorted sublists.
-