Exemple #1
0
 def test_max_withNotEmptyTree_shouldReturnLargestKeyFromTree(self):
     bst = Treap()
     for i in range(1, 20):
         bst.put(i, i)
         self.assertEqual(i, bst.max())
Exemple #2
0
 def test_max_withEmptyTree_shouldReturnNone(self):
     bst = Treap()
     self.assertIsNone(bst.max())