The proper location of a new item in the sorted portion can be searched either by a linear search or by a binary search. Certainly, the binary insertion sort, the version using binary search, has better performance than the other one. Anyway, for simplicity the linear search version of the insertion sort is listed below.