if len(points) == 0:
return 0
points.sort(key=lambda x : x[1])
ans = 1
lst = points[0][1]
for pt in points:
if pt[0] <= lst:
continue
else:
ans += 1
lst = pt[1]
return ansi first sorted the points based on there ending and then incremented the ans only when the point started after the lst