




from __future__ import annotations

UpperCamelCase								=     'Alexander Joslin'



def 							_A   (						lowerCAmelCase_     :					int			):
     """simple docstring"""

     if number <= 0:
          lowerCAmelCase__		= F'n must be greater than 0. Got n = {number}'
          raise ValueError(lowerCAmelCase_			)

     lowerCAmelCase__		= [number + 1] * (number + 1)

     # starting position
     lowerCAmelCase__		= 0
     for i in range(1   ,				lowerCAmelCase_			):
          lowerCAmelCase__		= min(table[i + 1]   ,				table[i] + 1			)
          # check if out of bounds
          if i * 2 <= number:
               lowerCAmelCase__		= min(table[i * 2]   ,				table[i] + 1			)
          # check if out of bounds
          if i * 3 <= number:
               lowerCAmelCase__		= min(table[i * 3]   ,				table[i] + 1			)
     return table[number]


if __name__ == "__main__":
     import doctest

     doctest.testmod()


"""simple docstring"""

class    _UpperCAmelCase							:




      def __init__(							self      ,				lowercase_=None							)  ->    Union[str, Any]:
          UpperCAmelCase  	=    data
          UpperCAmelCase  	=    None




      def __repr__(							self							)  ->    Tuple:
          UpperCAmelCase  	=    ''
          UpperCAmelCase  	=    self
          while temp:
              string_rep += F"<{temp.data}> ---> "
              UpperCAmelCase  	=    temp.next
          string_rep += "<END>"
          return string_rep




def 			lowercase__  (    lowerCAmelCase :    int       )       ->					List[Any]:






    """simple docstring"""




    if not elements_list:
        raise Exception('The Elements List is empty'       )

    # Set first element as Head
    UpperCAmelCase  	=    Node(elements_list[0]       )
    UpperCAmelCase  	=    head
    # Loop through elements from position 1
    for data in elements_list[1:]:
        UpperCAmelCase  	=    Node(lowerCAmelCase       )
        UpperCAmelCase  	=    current.next
    return head


SCREAMING_SNAKE_CASE_			    =  [1, 3, 5, 32, 44, 12, 43]
print(F'List: {list_data}')
print('''Creating Linked List from List.''')
SCREAMING_SNAKE_CASE_			    =  make_linked_list(list_data)
print('''Linked List:''')







print(linked_list)



