Пример #1
0
    def test_parent_six(self):
        max_heap = MaxHeap([1])

        parent = max_heap.parent(6)
        self.assertEquals(2,parent)
Пример #2
0
    def test_parent_three(self):
        max_heap = MaxHeap([1])

        parent = max_heap.parent(3)
        self.assertEquals(1,parent) 
Пример #3
0
    def test_parent_five(self):
        max_heap = MaxHeap([1])

        parent = max_heap.parent(5)
        self.assertEquals(2,parent)
Пример #4
0
    def test_parent_two(self):
        max_heap = MaxHeap([1])

        parent = max_heap.parent(2)
        self.assertEquals(0,parent)