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实现字符串反转,不用strrev,不借用数组方式,时间复杂度度小于O(n)的,首尾交换的那种实现。
光阴似箭催人老,日月如移越少年。
= 0; $i--){ $tmp .= $str{$}; } echo $tmp;
貌似不存在O(n/2)这种说法,也还是O(n)
php
貌似不存在O(n/2)这种说法,也还是O(n)