Min Difference Element In Sorted Function