Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Leda > What is the dat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 199 of 212
Post > Topic >>

What is the data structure & algorithm that is fastest searching & sorting.

by "yee young han" <hotyoung@[EMAIL PROTECTED] > May 21, 2005 at 01:23 PM

I need a fast data structure and algorithm like below condition.

(1) this data structure contain only 10,000 data entry.
(2) data structure's one entry is like below

typedef struct _DataEntry_
{
     char szInput[4];
     char szOutput[4];
     int iSum;
} DataEntry;

(3) input data length is 100,000,000.
(4) if there is a same szInput & szOutput data in data structure when
input
data, only sum iSum into found data.
(5) this data structure have only 10,000 data entry that has large number
of
iSum.

if I insert one data to data structure, code like below is executed.

select data from list where szInput, szOutput;
if exist
    update iSum of szInput, szOutput
    sort
else
   insert DataEntry
   sort
end if

What is the data structure & algorithm that is fastest searching &
sorting.

please~ help me~




 1 Posts in Topic:
What is the data structure & algorithm that is fastest searching
"yee young han"  2005-05-21 13:23:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 19:13:13 CDT 2008.