:rtype : Node
(cls, intervals)
| 75 | |
| 76 | @classmethod |
| 77 | def from_sorted_intervals(cls, intervals): |
| 78 | """ |
| 79 | :rtype : Node |
| 80 | """ |
| 81 | if not intervals: |
| 82 | return None |
| 83 | node = Node() |
| 84 | node = node.init_from_sorted(intervals) |
| 85 | return node |
| 86 | |
| 87 | def init_from_sorted(self, intervals): |
| 88 | # assumes that intervals is a non-empty collection. |
no test coverage detected