






def      snake_case		(							UpperCAmelCase	:       str   ):
				A	 =      [0] * len(UpperCAmelCase   )

				for i in range(1,						len(UpperCAmelCase   )   ):
								# use last results for better performance - dynamic programming
								A	 =      prefix_result[i - 1]
								while j > 0 and input_string[i] != input_string[j]:
												A	 =      prefix_result[j - 1]

								if input_string[i] == input_string[j]:
												j += 1
								A	 =      j

				return prefix_result







def      snake_case		(							UpperCAmelCase	:       str   ):
				return max(prefix_function(UpperCAmelCase   )   )


if __name__ == "__main__":
					import doctest

					doctest.testmod()













import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
lowerCAmelCase_           = '.'


if __name__ == "__main__":
					lowerCAmelCase_           = os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
					lowerCAmelCase_           = []
					lowerCAmelCase_           = []
					with open(doctest_file_path) as fp:
										for line in fp:
															lowerCAmelCase_           = line.strip()
															lowerCAmelCase_           = os.path.join(REPO_PATH, line)
															if not (os.path.isfile(path) or os.path.isdir(path)):
																				non_existent_paths.append(line)
															all_paths.append(path)
					if len(non_existent_paths) > 0:
										lowerCAmelCase_           = '\n'.join(non_existent_paths)
										raise ValueError(f'''`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}''')
					if all_paths != sorted(all_paths):
										raise ValueError('Files in `utils/documentation_tests.txt` are not in alphabetical order.')





