


class A__     :



  """simple docstring"""



  def __init__( self			:  Optional[int]       ):
        a__	:  Dict     =   ""
        a__	:  Optional[Any]     =   ""
        a__	:  Any     =   []

  def    _UpperCamelCase( self			:  Any				,				lowerCamelCase__			:  int				,				lowerCamelCase__			:  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]:
                    a__	:  List[str]     =   self.__min_dist_top_down_dp(m - 1				,				n - 1       )
              else:
                    a__	:  Any     =   self.__min_dist_top_down_dp(lowerCamelCase__				,				n - 1       )
                    a__	:  Optional[Any]     =   self.__min_dist_top_down_dp(m - 1				,				lowerCamelCase__       )
                    a__	:  Optional[int]     =   self.__min_dist_top_down_dp(m - 1				,				n - 1       )
                    a__	:  str     =   1 + min(lowerCamelCase__				,				lowerCamelCase__				,				lowerCamelCase__       )

              return self.dp[m][n]

  def    _UpperCamelCase( self			:  Tuple				,				lowerCamelCase__			:  str				,				lowerCamelCase__			:  str       ):
        a__	:  int     =   worda
        a__	:  List[str]     =   worda
        a__	:  Tuple     =   [[-1 for _ in range(len(lowerCamelCase__       )       )] for _ in range(len(lowerCamelCase__       )       )]

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

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


if __name__ == "__main__":
    UpperCamelCase					:       Optional[Any]			    =     EditDistance()

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

    UpperCamelCase					:       int			    =     input("""Enter the first string: """).strip()
    UpperCamelCase					:       Dict			    =     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"""





def 					__A  (_SCREAMING_SNAKE_CASE     )   ->str:





  """simple docstring"""


  lowerCAmelCase__     :List[Any]											=				int(_SCREAMING_SNAKE_CASE     )
  if decimal in (0, 1):  # Exit cases for the recursion
    return str(_SCREAMING_SNAKE_CASE     )
  lowerCAmelCase__				,							lowerCAmelCase__     :int											=				divmod(_SCREAMING_SNAKE_CASE	,  2     )
  return binary_recursive(_SCREAMING_SNAKE_CASE     ) + str(_SCREAMING_SNAKE_CASE     )
def 					__A  (_SCREAMING_SNAKE_CASE     )   ->str:





  """simple docstring"""


  lowerCAmelCase__     :str											=				str(_SCREAMING_SNAKE_CASE     ).strip()
  if not number:
    raise ValueError('No input value was provided'     )
  lowerCAmelCase__     :Dict											=				'-' if number.startswith('-'     ) else ''
  lowerCAmelCase__     :int											=				number.lstrip('-'     )
  if not number.isnumeric():
    raise ValueError('Input value is not an integer'     )
  return F"{negative}0b{binary_recursive(int(_SCREAMING_SNAKE_CASE     )     )}"


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

  testmod()
