예제 #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)