Skip to content

Commit aae53cb

Browse files
committed
Comment changes for question 23.
1 parent aa25e66 commit aae53cb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

23_EntryNodeInListLoop/EntryNodeInListLoop.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ListNode* EntryNodeOfLoop(ListNode* pHead)
4141
if(meetingNode == nullptr)
4242
return nullptr;
4343

44-
// get the number of nodes in loop
44+
// 得到环中结点的数目
4545
int nodesInLoop = 1;
4646
ListNode* pNode1 = meetingNode;
4747
while(pNode1->m_pNext != meetingNode)
@@ -50,12 +50,12 @@ ListNode* EntryNodeOfLoop(ListNode* pHead)
5050
++nodesInLoop;
5151
}
5252

53-
// move pNode1
53+
// 先移动pNode1,次数为环中结点的数目
5454
pNode1 = pHead;
5555
for(int i = 0; i < nodesInLoop; ++i)
5656
pNode1 = pNode1->m_pNext;
5757

58-
// move pNode1 and pNode2
58+
// 再移动pNode1和pNode2
5959
ListNode* pNode2 = pHead;
6060
while(pNode1 != pNode2)
6161
{

0 commit comments

Comments
 (0)