Show Bid Request
Count multiple occurences in a 1 dimensional array
Bid Request Id: 46232
|
|
|
Description:
I need the fastest and most efficient stand-alone function in VB that will count multiple occurences of duplicate items in a one-dimensional array and return the duplicate names and the number of occurences in a 2D array in ascending order. There is no preference on which dimension is which on the output.
The function would look something like this: Public Function(InputArr as Variant, OutputArr as Variant)
The following is a very simple example. Each line may be 100 long and there may be well over 10,000 lines to process.
Input array may be:
They are jogging. He swims every day. I am swimming. Joe is sleeping. They are jogging. I am swimming. I am swimming.
The output array would be this: (the 2nd dimension is separated by a comma for visual clarity)
He swims every day. , 1 I am swimming. , 3 Joe is sleeping. , 1 They are jogging. , 2
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
Visual Basic 6
Special Conditions / Other:
Please complete within 2-3 days of acceptance.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$30 (USD)
|
Feb 1, 2003 1:17:10 AM EDT
|
9.96
(Excellent)
|
|
|
Here's an example of what you're looking for.
The function definition is:
Result = GroupArr(Source)
Result
The returned 2D Array where the 1st Element is the String and the 2nd Element is the number of times it occured in the Source array.
Source
The source 1D Array.
I think you'll find the method I've used to be very fast.
In my tests 10,000 unique 100 character items were counted in 3.3 seconds Using a PIII 600Mhz. PC
If there are duplicates (as I'd expect there to be) the function is even faster.
My bid is for the code to this example, which is complete and fully commented.
Regards,
- Aaron.
|
|
Attached File
|
|
|
|
|