Message 1 of 5
collection / array question

Not applicable
01-28-2002
01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a list of numbers I need to sort.
I have Chris Rhea?'s Bubble sort routine I adapted for doubles.
That wants an array(variant) as input.
Not knowing the length of the list I either need to redim multiple times or
put in a collection, get the count and then redim once to the size I need.
I'm wondering which is better, a collection and one redim, or just one array
with multiple redims?
How much does it cost to create a collection that I'm just going to stick
into an array anyway?
Or can i sort a collection - I guess the bubble sort idea could be adapted
to work with a collection object.
Or is that plaigarism to rework something like that if you retain the
original credits info in the modified code?
Or does any of this make any sense?
Thanks for any inspirations.
Mark
I have a list of numbers I need to sort.
I have Chris Rhea?'s Bubble sort routine I adapted for doubles.
That wants an array(variant) as input.
Not knowing the length of the list I either need to redim multiple times or
put in a collection, get the count and then redim once to the size I need.
I'm wondering which is better, a collection and one redim, or just one array
with multiple redims?
How much does it cost to create a collection that I'm just going to stick
into an array anyway?
Or can i sort a collection - I guess the bubble sort idea could be adapted
to work with a collection object.
Or is that plaigarism to rework something like that if you retain the
original credits info in the modified code?
Or does any of this make any sense?
Thanks for any inspirations.
Mark