Insertion Sort Question Leetcode Sql