Sort A Nearly Sorted Array Leetcode Problems