5 ms·
You're right. Enqueue is wrong, it should be: if ( !m_pHead ) m_pHead = p ; else m_pTail->next = p; m_pTail = p; For some reason,
by chacham15 12y ago
You're right. Enqueue is wrong, it should be:
if ( !m_pHead )
m_pHead = p ;
else
m_pTail->next = p;
m_pTail = p;
For some reason, the author is inserting the node in front of the tail leading to the error.