擅长:python、mysql、java
<p>这类似于合并排序。这里需要<strong>O(n)时间来分割数组</strong><a href="https://stackoverflow.com/questions/13203601/big-o-of-list-slicing">as seen here</a>,然后对列表的两部分执行操作。合并排序的时间复杂度为O(nlog(n))。在</p>
<p>如果您想派生merge sort,可以看一下<a href="https://cs.stackexchange.com/questions/54525/how-to-calculate-the-mergesort-time-complexity">this</a></p>