input: Write a python function to traverse the linked list and return a list of employee names in the order of their salaries.
  assert traverse_list(LinkedList()) == []
  ll = LinkedList()
  ll.insert(Node('Alice', 50000))
  ll.insert(Node('Bob', 60000))
  ll.insert(Node('Charlie', 45000))
  assert traverse_list(ll) == ['Charlie', 'Alice', 'Bob']
  ll.insert(Node('David', 55000))
  assert traverse_list(ll) == ['Charlie', 'Alice', 'David', 'Bob']
output: class Node:
      def __init__(self, name, salary):
          self.name = name
          self.salary = salary
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def insert(self, new_node):
          if self.head is None or self.head.salary > new_node.salary:
              new_node.next = self.head
              self.head = new_node
          else:
              current = self.head
              while current.next is not None and current.next.salary <= new_node.salary:
                  current = current.next
              new_node.next = current.next
              current.next = new_node
  
  def traverse_list(linked_list):
      current = linked_list.head
      result = []
      while current:
          result.append(current.name)
          current = current.next
      return result