JavaScript:实现TimSort蒂姆排序算法
/**
* @function Timsort is a hybrid stable sorting algorithm, derived from merge sort and insertion sort,
* designed to perform well on many kinds of real-world data.
* It was implemented by Tim Peters in 2002 for use in the Python programming language.
* It is also used to sort arrays of non-primitive type in Java SE 7,
* on the Android platform, in GNU Octave, on V8, Swift and Rust.
* 1) It sorts small partitions using Insertion Sort.
* 2) Merges the partition using Merge Sort.
* @param {Array} array
*/
const Timsort =