CTCI 5.8 draw a line from (x1,y) to (x2, y)