best teim to but and sell stock iii, divide and conquer + dp