class Solution { public: ListNode* mergeTwoList(ListNode* head1,ListNode* head2){ //合并二个链表,返回合并后链表的头指针 if(head1 == nullptr || head2 == nullptr){ //head1为空返回head2,head2为空返回head1 //head1和head2都为空返回nullptr return head1 == nullptr ? head2 : head1;...