Alll test cases are not passed

i am not able to understand what comparator function should i use

hey, u do not need a comparator for this question at all, the array is already sorted, simply apply binary search to find the first and last occurence of the number and print the next and the previous index for upper and lower bound respectively