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