コード例 #1
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_2(self):
		self.assertEqual(kadanesAlgorithm([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]), -1)
コード例 #2
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_13(self):
		self.assertEqual(kadanesAlgorithm([100, 8, 5, -9, 1, 3, -2, 3, 4, 7, 2, -18, 6, 3, 1, -5, 6, 20, -23, 15, 1, -3, 4]), 135)
コード例 #3
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_1(self):
		self.assertEqual(kadanesAlgorithm([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 55)
コード例 #4
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_11(self):
		self.assertEqual(kadanesAlgorithm([8, 5, -9, 1, 3, -2, 3, 4, 7, 2, -18, 6, 3, 1, -5, 6]), 22)
コード例 #5
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_9(self):
		self.assertEqual(kadanesAlgorithm([8, 5, -9, 1, 3, -2, 3, 4, 7, 2, -9, 6, 3, 1, -5, 4]), 23)
コード例 #6
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_7(self):
		self.assertEqual(kadanesAlgorithm([3, 4, -6, 7, 8]), 16)
コード例 #7
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_6(self):
		self.assertEqual(kadanesAlgorithm([1, 2, -4, 3, 5, -9, 8, 1, 2]), 11)
コード例 #8
0
ファイル: Test.py プロジェクト: CodeInDna/Algo_with_Python
	def test_case_5(self):
		self.assertEqual(kadanesAlgorithm([1, 2, 3, 4, 5, 6, -22, 7, 8, 9, 10]), 34)