Domanda di colloquio di Time Inc.

Basic Java Questions. They work on SQL & JSP so some questions on that. And one question on problem solving. Find out the max profit you can make by buying and selling a stock when given a list having entities of time stamp and stock value.