By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

sorting algorithm

P: n/a
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.

Jun 7 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
comparc wrote:
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

--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!
Jun 7 '07 #2

P: n/a
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
On Jun 7, 10:18 pm, Daniel Kraft <d...@domob.euwrote:
comparc wrote:
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

--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!

Jun 7 '07 #3

P: n/a
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

--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!
Jun 7 '07 #4

P: n/a
daniel i have written a mail to u at d@domob.eu.can please reply to
that mail or give me another id where i can post or chat with
you.thanks a ton for reply

On Jun 7, 10:44 pm, Daniel Kraft <d...@domob.euwrote:
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 instancehttp://www.sgi.com/tech/stl/set.html

Hope this is really what you want,
yours,
Daniel

--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!

Jun 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.