Home > Back-end >  Want to know what inside the parentheses fill, don't understand
Want to know what inside the parentheses fill, don't understand

Time:10-25

CodePudding user response:

This is not the most basic merge sort?
While (pa & amp; & Pb) {
If (pa - & gt; Val & lt; Pb - & gt; Val) {//because don't know what structure is here, the val instead of the value of the node to make yourself according to the structure change
PC - & gt; Next=pa;
PC=PC - & gt; next;
Pa=pa - & gt; next;
}
The else {
PC - & gt; Next=pb;
PC=PC - & gt; next;
Pb=pb - & gt; next;
}
If (pa) PC - & gt; Next=pa;
If (pb) PC - & gt; Next=pb;
Free (Lb);
}

CodePudding user response:

reference 1st floor qybao response:
this is not the most basic merge sort?
While (pa & amp; & Pb) {
If (pa - & gt; Val & lt; Pb - & gt; Val) {//because don't know what structure is here, the val instead of the value of the node to make yourself according to the structure change
PC - & gt; Next=pa;
PC=PC - & gt; next;
Pa=pa - & gt; next;
}
The else {
PC - & gt; Next=pb;
PC=PC - & gt; next;
Pb=pb - & gt; next;
}
If (pa) PC - & gt; Next=pa;
If (pb) PC - & gt; Next=pb;
Free (Lb);
}

Teacher speak I don't understand, feel what all can't, alas ╯ man ╰
  • Related