84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如图:php快速法,循环里面的两种写法,上面的可以,下面的回报以歌错误;
错误截图:
认证高级PHP讲师
你难道以为
if ($v > $mid) { $rightArr[] = $v; } if ($v < $mid) { $leftArr[] = $v; }
和
if ($v < $mid) { $leftArr[] = $v; } else { $rightArr[] = $v; }
是一个意思吗?
难道你不考虑$v == $mid的情况吗?
$v == $mid
你难道以为
和
是一个意思吗?
难道你不考虑
$v == $mid
的情况吗?