

'''simple docstring'''

def      __magic_name__							(			A       , A				)      ->		int:
	# The longer word should come first
	if len(A				) < len(A				):
		return levenshtein_distance(A       , A				)

	if len(A				) == 0:
		return len(A				)

	snake_case							=					list(range(len(A				) + 1				)				)

	for i, ca in enumerate(A				):
		snake_case							=					[i + 1]

		for j, ca in enumerate(A				):
			# Calculate insertions, deletions and substitutions
			snake_case							=					previous_row[j + 1] + 1
			snake_case							=					current_row[j] + 1
			snake_case							=					previous_row[j] + (ca != ca)

			# Get the minimum to append to the current row
			current_row.append(min(A       , A       , A				)				)

		# Store the previous row
		snake_case							=					current_row

	# Returns the last element (distance)
	return previous_row[-1]


if __name__ == "__main__":
						lowerCAmelCase_     =      input("Enter the first word:\n").strip()
						lowerCAmelCase_     =      input("Enter the second word:\n").strip()

						lowerCAmelCase_     =      levenshtein_distance(first_word, second_word)
						print(f"Levenshtein distance between {first_word} and {second_word} is {result}")








'''simple docstring'''

def      __magic_name__							(			A				)      ->		tuple[int, int]:
	# base case
	if len(A				) == 1:
		return a[0], a[0]
	else:
		# split A into half.
		snake_case							=					a[: len(A				) // 2]
		snake_case							=					a[len(A				) // 2 :]

		# 2 sub problems, 1/2 of original size.
		snake_case			,			snake_case							=					max_difference(A				)
		snake_case			,			snake_case							=					max_difference(A				)

		# get min of first and max of second
		# linear time
		snake_case							=					min(A				)
		snake_case							=					max(A				)

		# 3 cases, either (small1, big1),
		# (min_first, max_second), (small2, big2)
		# constant comparisons
		if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
			return smalla, biga
		elif biga - smalla > max_second - min_first:
			return smalla, biga
		else:
			return min_first, max_second


if __name__ == "__main__":
						import doctest

						doctest.testmod()





