You have given below array and we need to return the Best time to sell index and best time buy index in the form of array.
int[] prices= {7,1,5,3,6,4}