def test9(self): array = [ 3, 4, 9, 2, 1, -9, -4, 3, 8, -9, 10, 12, 400, 123213, 85, 4, 3, 1, 2, 3 ] self.assertEqual(-4, iterative_quickselect(array, 2))
def test6(self): array = [-2, -9, -12, 3, 2, 1] self.assertEqual(None, iterative_quickselect(array, 221))
def test4(self): array = [-2, -9, -12, 3, 2, 1] self.assertEqual(1, iterative_quickselect(array, 3))
def test5(self): array = [-2, -9, -12, 3, 2, 1] self.assertEqual(-2, iterative_quickselect(array, 2))
def test2(self): array = [-2, -9, -12, 3, 2, 1] self.assertEqual(3, iterative_quickselect(array, 5))