solved 3 questions on best time to buy and sell stock