3 ms·
Only for reasonably small stacks. Insertions at random indices won't stay O(1) when you're dealing with 100k pages and more – i.e., when you can't pick them up
by adwn 4y ago
Only for reasonably small stacks. Insertions at random indices won't stay O(1) when you're dealing with 100k pages and more – i.e., when you can't pick them up in one movement.
- bee_rider 4y agoI guess such a stack would fall over quickly, resulting in a heap. But again not the programming one.