Objective: Given 1-D list of coordinates, (x1, x2), (x3, x4), , , ,(xn-1, xn)and interval (a, b). Write an algorithm to determine if interval (a,b) is covered in the list of coordinates.

Example:

Coordinates -  [(2,5), (5,7),(1,4)] and interval = (1,6)
Return true
Explanation - Points 1 to 6 lies in list of interval given 1 to 4. 2 to 5 and 5 to 7.

Coordinates - [(1,4),(6,7),(2,5)] and interval = (1,6)
Return false
Explanation - Distance between 5 to 6 is not covered in the list given so return false