Hi

I found my code gives different answers between test case and run time.

This is for test case [[1,4],[2,5]].

Could someone please throw some light here?

'''

class Solution(object):

```
def merge(self, intervals):
if intervals == []: return []
if len(intervals) == 1: return intervals
intervals.sort()
ret = []
cur = intervals[0]
for i in range(1, len(intervals)):
s = intervals[i].start
e = intervals[i].end
if cur.end < s:
ret.append(Interval(cur.start,cur.end))
cur.start = s
cur.end = e
else:
cur.end = max(e, cur.end)
return ret + [cur]
```

'''