Leetcode Find The Index Of An Element In The Upper