[ymeng] Refactor implementation of straight insertion sort