Solve the buy and sell stock iii problem partially. Only one solution will be found by BFS right now.