Envestnet interview question

Java program to find best stock sell profit