Home > Back-end >  Consult, this how to understand the equation?
Consult, this how to understand the equation?

Time:11-14

Option B

CodePudding user response:

According to the characteristics of the chain queue: first in first out, from the beginning, from the tail into the characteristics of the team has something to do with the line, therefore, C and D are associated with team head, so you don't choose,

P - & gt; Next=rear - & gt; next; Is the rear next (NULL) normally assigned to p - & gt; next; Commonly is NULL, but not clear list is created, so he wrote such p - & gt; Next=rear - & gt; next; Comparison of insurance;
Rear=rear - & gt; Next=p; First calculated from right to left, p assigned to rear - & gt; next; Then rear - & gt; Next assignment to the rear, so finally put p in the line, and let the rear to p;

CodePudding user response:

reference 1/f, confident boy reply:
according to the characteristics of the chain queue: first in first out, from the beginning, from the tail into the characteristics of the team has something to do with the line, therefore, C and D are associated with team head, so you don't choose,

P - & gt; Next=rear - & gt; next; Is the rear next (NULL) normally assigned to p - & gt; next; Commonly is NULL, but not clear list is created, so he wrote such p - & gt; Next=rear - & gt; next; Comparison of insurance;
Rear=rear - & gt; Next=p; First calculated from right to left, p assigned to rear - & gt; next; Then rear - & gt; Next assignment to the rear, so finally put p in the line, and let the rear to p;

Wow, thanks for a great god, and speak very clearly,