update solution for leetcode Search Insert Position