Re: Optimal Structure for Inserting and Deleting
Frans Bouma <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <014301c85de7$31f97640$95ec62c0$@nl> |
Then Per's post is on the mark, you can use any linear structure, like list,
array etc.
FB
> > perhaps I'm mistaken, but I read 'would preserve ordering during inserts,
> deletes and swaps' as that it has to keep 'an' ordering set in the list. As
> a random bucket of elements always has 'an' order, I presume it's a forced
> ordering, i.e. sorted. BUt perhaps I misinterpreted the requirements ;)
>
>
> Maybe an example is in order. My original list starts out as:
>
> Pear
> Apple
> Raspberry
>
> Then my user wants to insert Fruitcake between Pear and Apple, so the list
> becomes
>
> Pear
> Fruitcake
> Apple
> Raspberry
>
> Then my user decides Raspberry should be above Apple, executes a Move Up
> command, and the list becomes
>
> Pear
> Fruitcake
> Raspberry
> Apple
>
> I have no keys or any sort with which to preserve these orderings except the
> order the items appear in the list.
>
> ===================================
> This list is hosted by DevelopMentor. http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com