why n2 is unread in the code which lead to exclusion of 2 from final answer
Merge sort using linked list
sorry merge sorted linked list as title
@Basant-Kumar-1342173592623612 you were taking input in a wrong order in your build_list function . Please make these changes.
void buildlist(Node* &head ,int n){
int data;
int count =1;
//cin>>data;
while(count<=n){
cin>>data;
insertattail(head ,data);
count++;
}
//cout<<count<<endl;
}
@Basant-Kumar-1342173592623612 If you don’t have any further queries please mark the doubt as resolved.