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