示例#1
0
 def assert_operation(val_list, x, result_list):
     linked_list = LinkedList(singly=True)
     linked_list.append_val_list(val_list)
     head = partition(linked_list.get_head(), x)
     linked_list.set_head(head)
     self.assertListEqual(result_list, linked_list.to_list())
 def assert_operation(val_list, result_list):
     linked_list = LinkedList(singly=True)
     linked_list.append_val_list(val_list)
     delete_duplicates(linked_list.get_head())
     self.assertListEqual(result_list, linked_list.to_list())