Insertion Sort is a simple sorting technique which was covered in previous challenges. Sometimes, arrays may be too large for us to wait around for insertion sort to finish. Is there some other way we can calculate the number of shifts an Insertion Sort performs when sorting an array?
If is the number of elements over which the element of the array has to shift, then the total number of shifts will be ... + . For example, consider the array .