Talk:VList: Difference between revisions

(Oops.. fraction upside down.)
 
(One intermediate revision by one other user not shown)
Line 31:
::::::: Hmm? If you want to make a reference to a slice of the array, just copy the pointer and set a new offset, which is O(1). If you need to copy the content, then every block that's not empty should be copied, which involves all n elements that's currently filled. The point of taking a slice reference is to avoid this copying. --[[User:Ledrug|Ledrug]] 18:26, 13 September 2011 (UTC)
:::::::: Hmm.. ok... But you need to be careful about the set of allowed operations on a slice. For example, think about what happens to a slice that omits the first character of the original and then what happens when you add another character. Note that if you add to the slice, the behavior of the original is different if it was length 2 vs. if it was length 6. Something analogous can happen with cloning: with a suitably restricted set of operations (if adding is allowed but not dropping) you do not have to clone the entire set of data and can clone only the first block. --[[User:Rdm|Rdm]] 19:50, 13 September 2011 (UTC)
::::::::: I think the task is strangely described: the algorithm is nowhere specified, and instead there is a specification to have the code function at O(1) or similar speed. Is there any available linked-list code that at least meets the speed specifications from which I can pull an algorithm? --[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 02:41, 23 June 2022 (UTC)
:::::::::: The original paper can be found at https://cl-pdx.com/static/techlists.pdf --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 02:18, 24 June 2022 (UTC)
7,794

edits