sorting algorithm

C

comparc

Suggest me some
magic way so that by the time I finish reading all the elements of the
string into main memory for computing, the list is already sorted.
 
C

comparc

Hi daniel thanks for reply

actually i am looking for sorting procedure by which i can sort the
nodes when i am reading that node .

hope now its clear
 
C

comparc

daniel i have written a mail to u at (e-mail address removed) please reply to
that mail or give me another id where i can post or chat with
you.thanks a ton for reply
 
D

Daniel Kraft

comparc said:
Suggest me some
magic way so that by the time I finish reading all the elements of the
string into main memory for computing, the list is already sorted.

I can't really tell much here, as I did not quite understand what
exactly you want to do (your explanation sounds quite vague to me).

But have a look at std::set, this could be of help to you.

Yours, Daniel
 
D

Daniel Kraft

actually i am looking for sorting procedure by which i can sort the
nodes when i am reading that node .

Unfortunatelly, still not "really" clear...
However, I believe there are two standard-library utilities to help you.

Either std::sort which can sort the nodes when you have finished, but I
think this is not what you want.

As I suggested, std::set (or multi-set) could be what you are looking
for; this is a container where you can insert elements and they are kept
and accessible in sorted order at every time; look at the documentation
for details, for instance
http://www.sgi.com/tech/stl/set.html

Hope this is really what you want,
yours,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,294
Messages
2,571,509
Members
48,193
Latest member
DannyRober

Latest Threads

Top