
"""simple docstring"""

def 			lowercase__  (    lowerCAmelCase :    int       , lowerCAmelCase :    list       )       ->					list:






    """simple docstring"""




    UpperCAmelCase  	=    sorted(lowerCAmelCase       , key=lambda lowerCAmelCase       : value[2]       , reverse=lowerCAmelCase       )

    # Create a list of size equal to the maximum deadline
    # and initialize it with -1
    UpperCAmelCase  	=    max(lowerCAmelCase       , key=lambda lowerCAmelCase       : value[1]       )[1]
    UpperCAmelCase  	=    [-1] * max_deadline

    # Finding the maximum profit and the count of jobs
    UpperCAmelCase  	=    0
    UpperCAmelCase  	=    0
    for job in jobs:
        # Find a free time slot for this job
        # (Note that we start from the last possible slot)
        for i in range(job[1] - 1       , -1       , -1       ):
            if time_slots[i] == -1:
                UpperCAmelCase  	=    job[0]
                count += 1
                max_profit += job[2]
                break
    return [count, max_profit]


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)



