Merge pull request #289 from git-zjx/patch-3

Update main.php
This commit is contained in:
wangzheng0822 2019-04-06 10:00:39 +08:00 committed by GitHub
commit 277cf28310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ Class SingleLinkedListAlgo
++$i;
}
if ($fast == null) {
if (null == $fast) {
return true;
}
@ -305,4 +305,4 @@ echo '---------------------- 求链表的中间结点 ----------------------' .
$listAlgo->setList($list);
$middleNode = $listAlgo->findMiddleNode();
var_dump($middleNode->data);
echo '-------------------------------------------------------------'. PHP_EOL . PHP_EOL;
echo '-------------------------------------------------------------'. PHP_EOL . PHP_EOL;