Change the color of the nodes when goes thru the steps of algorithm