"Lee" <> wrote:
> I have an array of DNA sequences, ordered by length.
> From this, I want to be able to keep it ordered and just take out
> selected sequences.
"selected" how?
> Thus, shift or pop won't work. I'm not so sure
> what splice does entirely, but I'm pretty sure it doesn't work either.
If you mean "selected" by index, then of course splice works. It is linear
time in the size of the array, but it is a very fast linear time.
splice @array,$selected_index,1;
> Does anyone have a suggestion on a function or algorithm? Thanks.
The best choice of algorithm probably depends on why you (think you) need
to keep it sorted by length. But often you don't need the best choice of
algorithm, just a good enough one will be good enough.
Xho
--
--------------------
http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB