473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

sorting algorithm

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
4 1506
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shaunak Kashyap | last post by:
Does anyone know what sorting algorithm(s) -- quicksort, mergesort, radix sort, etc. -- does PHP use internally in its sort function?
22
by: mike | last post by:
If I had a date in the format "01-Jan-05" it does not sort properly with my sort routine: function compareDate(a,b) { var date_a = new Date(a); var date_b = new Date(b); if (date_a < date_b)...
1
by: aredo3604gif | last post by:
On Sun, 10 Apr 2005 19:46:32 GMT, aredo3604gif@yahoo.com wrote: >The user can dynamically enter and change the rule connection between >objects. The rule is a "<" and so given two objects: >a <...
25
by: Allie | last post by:
How would I go about sorting this structure by title? typedef struct { char author; char title; char code; int hold; int loan; } LIBRARY;
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
4
by: rushik | last post by:
Hello all, I am using structure in my program, and my aim is to sort this structure based on some optimized sorting algo. structure is struct data { int account;
11
by: Registered User | last post by:
What is the name of the following sorting method? for (i=0; i<n-1; i++) for (j=i+1; j<n; j++) if (a>a) swap(&a, &a); It seems to be the opposite of bubble sort, with lighter elements going...
5
by: chrisguest | last post by:
I am trying to write some code that will take a list of functional expressions, and order them so that those with primitive terms appear at the beginning of the list and those that are defined by...
17
by: Umesh | last post by:
I don't understand it. Help me by writing a program while i try myself to sort an array of numbers. Thanks.
5
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.