not getting the desired output please find mistake
hello @kartik-malik check ur search space, it should be s=a[0] and e=arr[n-1]