Beispiel #1
0
class TestMergeIntervals(unittest.TestCase):
    def setUp(self):
        self.solution = Solution()
    def test_mergeIntervals(self):
        #[1,3],[2,6],[8,10],[15,18],
        intervals = [Interval(1, 3), Interval(2, 6), Interval(8,10), Interval(15,18)]
        pprint(intervals)
        merged = self.solution.merge(intervals)
        pprint(merged)
Beispiel #2
0
class TestMergeIntervals(unittest.TestCase):
    def setUp(self):
        self.solution = Solution()

    def test_mergeIntervals(self):
        #[1,3],[2,6],[8,10],[15,18],
        intervals = [
            Interval(1, 3),
            Interval(2, 6),
            Interval(8, 10),
            Interval(15, 18)
        ]
        pprint(intervals)
        merged = self.solution.merge(intervals)
        pprint(merged)
Beispiel #3
0
 def setUp(self):
     self.solution = Solution()
Beispiel #4
0
 def setUp(self):
     self.solution = Solution()