note 125181 added to ds-deque.unshift
| From: | hugo at fc dot up dot pt | Date: | Fri, 10 Jul 2020 12:46:05 +0000 |
| Subject: | note 125181 added to ds-deque.unshift | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214854@lists.php.net to get a copy of this message | ||
Where the documentation says "moving all the current values forward", while it sounds like
the complexity would be O(N), I checked the code at https://github.com/php-ds/ext-ds/blob/master/src/ds/ds_deque.c#L366
and it is in fact O(1) for each element
----
Server IP: 45.112.84.4
Probable Submitter: 103.51.166.36 (proxied: 2001:818:e612:3200:b32d:3ec5:f18c:7ab1)
----
Manual Page -- http://php.net/manual/en/ds-deque.unshift.php
Edit -- https://master.php.net/note/edit/125181
Del: integrated -- https://master.php.net/note/delete/125181/integrated
Del: useless -- https://master.php.net/note/delete/125181/useless
Del: bad code -- https://master.php.net/note/delete/125181/bad+code
Del: spam -- https://master.php.net/note/delete/125181/spam
Del: non-english -- https://master.php.net/note/delete/125181/non-english
Del: in docs -- https://master.php.net/note/delete/125181/in+docs
Del: other reasons-- https://master.php.net/note/delete/125181
Reject -- https://master.php.net/note/reject/125181
Search -- https://master.php.net/manage/user-notes.php