Solution for Search Insert Position