





class    __SCREAMING_SNAKE_CASE			:







       def __init__(      self     :	Optional[Any]			)   ->Tuple:
          lowerCamelCase__   :						str					   =							''''''
          lowerCamelCase__   :						int					   =							''''''
          lowerCamelCase__   :						List[str]					   =							[]







       def 						__lowerCamelCase    (      self     :	Tuple		,					A     :	Optional[Any]		,					A     :	Dict			)   ->int:
          if m == -1:
             return n + 1
          elif n == -1:
             return m + 1
          elif self.dp[m][n] > -1:
             return self.dp[m][n]
          else:
             if self.worda[m] == self.worda[n]:
                lowerCamelCase__   :						List[str]					   =							self.__min_dist_top_down_dp(m - 1		,					n - 1			)
             else:
                lowerCamelCase__   :						str					   =							self.__min_dist_top_down_dp(A		,					n - 1			)
                lowerCamelCase__   :						str					   =							self.__min_dist_top_down_dp(m - 1		,					A			)
                lowerCamelCase__   :						List[Any]					   =							self.__min_dist_top_down_dp(m - 1		,					n - 1			)
                lowerCamelCase__   :						Any					   =							1 + min(A		,					A		,					A			)

             return self.dp[m][n]







       def 						__lowerCamelCase    (      self     :	Dict		,					A     :	int		,					A     :	Any			)   ->int:
          lowerCamelCase__   :						Union[str, Any]					   =							worda
          lowerCamelCase__   :						Optional[Any]					   =							worda
          lowerCamelCase__   :						Tuple					   =							[[-1 for _ in range(len(A			)			)] for _ in range(len(A			)			)]

          return self.__min_dist_top_down_dp(len(A			) - 1		,					len(A			) - 1			)







       def 						__lowerCamelCase    (      self     :	List[Any]		,					A     :	List[Any]		,					A     :	Dict			)   ->int:
          lowerCamelCase__   :						Optional[Any]					   =							worda
          lowerCamelCase__   :						Dict					   =							worda
          lowerCamelCase__   :						Optional[Any]					   =							len(A			)
          lowerCamelCase__   :						Optional[Any]					   =							len(A			)
          lowerCamelCase__   :						Tuple					   =							[[0 for _ in range(n + 1			)] for _ in range(m + 1			)]

          for i in range(m + 1			):
             for j in range(n + 1			):
                if i == 0:  # first string is empty
                   lowerCamelCase__   :						int					   =							j
                elif j == 0:  # second string is empty
                   lowerCamelCase__   :						str					   =							i
                elif worda[i - 1] == worda[j - 1]:  # last characters are equal
                   lowerCamelCase__   :						List[Any]					   =							self.dp[i - 1][j - 1]
                else:
                   lowerCamelCase__   :						int					   =							self.dp[i][j - 1]
                   lowerCamelCase__   :						int					   =							self.dp[i - 1][j]
                   lowerCamelCase__   :						str					   =							self.dp[i - 1][j - 1]
                   lowerCamelCase__   :						Union[str, Any]					   =							1 + min(A		,					A		,					A			)
          return self.dp[m][n]


if __name__ == "__main__":
       _A					:    str   =  EditDistance()

       print('****************** Testing Edit Distance DP Algorithm ******************')
       print()

       _A					:    int   =  input('Enter the first string: ').strip()
       _A					:    int   =  input('Enter the second string: ').strip()

       print()
       print(F'''The minimum edit distance is: {solver.min_dist_top_down(Sa, Sa)}''')
       print(F'''The minimum edit distance is: {solver.min_dist_bottom_up(Sa, Sa)}''')
       print()
       print('*************** End of Testing Edit Distance DP Algorithm ***************')







# flake8: noqa
# Lint as: python3
UpperCAmelCase__   	=							[
    '''VerificationMode''',
    '''Version''',
    '''disable_progress_bar''',
    '''enable_progress_bar''',
    '''is_progress_bar_enabled''',
    '''experimental''',
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental

