






"""simple docstring"""


class 						snake_case  :





    def __init__(							self     : Optional[Any]      ):


      '''simple docstring'''




      a					:      List[str]    =       ''
      a					:      Tuple    =       ''
      a					:      Dict    =       []





    def     lowerCamelCase__				(							self     : str    ,		A     : int    ,		A     : int      ):


      '''simple docstring'''




      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]:
          a					:      Optional[Any]    =       self.__min_dist_top_down_dp(m - 1    ,		n - 1      )
        else:
          a					:      Union[str, Any]    =       self.__min_dist_top_down_dp(A    ,		n - 1      )
          a					:      Dict    =       self.__min_dist_top_down_dp(m - 1    ,		A      )
          a					:      Dict    =       self.__min_dist_top_down_dp(m - 1    ,		n - 1      )
          a					:      int    =       1 + min(A    ,		A    ,		A      )

        return self.dp[m][n]





    def     lowerCamelCase__				(							self     : Union[str, Any]    ,		A     : str    ,		A     : str      ):


      '''simple docstring'''




      a					:      Union[str, Any]    =       worda
      a					:      List[Any]    =       worda
      a					:      List[str]    =       [[-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     : Optional[Any]    ,		A     : str    ,		A     : str      ):


      '''simple docstring'''




      a					:      str    =       worda
      a					:      Optional[Any]    =       worda
      a					:      Optional[int]    =       len(A      )
      a					:      str    =       len(A      )
      a					:      Optional[Any]    =       [[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
            a					:      Optional[Any]    =       j
          elif j == 0:  # second string is empty
            a					:      Tuple    =       i
          elif worda[i - 1] == worda[j - 1]:  # last characters are equal
            a					:      Optional[int]    =       self.dp[i - 1][j - 1]
          else:
            a					:      Optional[Any]    =       self.dp[i][j - 1]
            a					:      List[str]    =       self.dp[i - 1][j]
            a					:      List[Any]    =       self.dp[i - 1][j - 1]
            a					:      Tuple    =       1 + min(A    ,		A    ,		A      )
      return self.dp[m][n]


if __name__ == "__main__":
   _UpperCamelCase    :   Optional[int]   			=						EditDistance()

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

   _UpperCamelCase    :   Union[str, Any]   			=						input('Enter the first string: ').strip()
   _UpperCamelCase    :   Any   			=						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 ***************')












"""simple docstring"""


_UpperCamelCase    :   List[Any]   			=						8.31_44_62  # Unit - J mol-1 K-1




def       snake_case  (A_				:float     ,      A_				:float     ,      A_				:float				):







  '''simple docstring'''

  if moles < 0 or kelvin < 0 or volume < 0:
    raise ValueError('Invalid inputs. Enter positive value.'				)
  return moles * kelvin * UNIVERSAL_GAS_CONSTANT / volume




def       snake_case  (A_				:float     ,      A_				:float     ,      A_				:float				):







  '''simple docstring'''

  if moles < 0 or kelvin < 0 or pressure < 0:
    raise ValueError('Invalid inputs. Enter positive value.'				)
  return moles * kelvin * UNIVERSAL_GAS_CONSTANT / pressure


if __name__ == "__main__":
   from doctest import testmod

   testmod()




