def testMiddle(self):
     A = [5,7,2,1,4,9,8,3,6]
     self.assertEqual(order_stats.kth(A, 5), 5)
 def testOutOfBound(self):
     A = [5,7,2,1,4,9,8,3,6]
     self.assertEqual(order_stats.kth(A, 10), None)
 def testFirst(self):
     A = [5,7,2,1,4,9,8,3,6]
     self.assertEqual(order_stats.kth(A, 1), 1)
 def testLast(self):
     A = [5,7,2,1,4,9,8,3,6]
     self.assertEqual(order_stats.kth(A, 9), 9)
Beispiel #5
0
 def testMiddle(self):
     A = [5, 7, 2, 1, 4, 9, 8, 3, 6]
     self.assertEqual(order_stats.kth(A, 5), 5)
Beispiel #6
0
 def testFirst(self):
     A = [5, 7, 2, 1, 4, 9, 8, 3, 6]
     self.assertEqual(order_stats.kth(A, 1), 1)
Beispiel #7
0
 def testOutOfBound(self):
     A = [5, 7, 2, 1, 4, 9, 8, 3, 6]
     self.assertEqual(order_stats.kth(A, 10), None)
Beispiel #8
0
 def testLast(self):
     A = [5, 7, 2, 1, 4, 9, 8, 3, 6]
     self.assertEqual(order_stats.kth(A, 9), 9)