473,324 Members | 2,511 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,324 software developers and data experts.

Sorting a doubly link list

Can any body tell me an effective algo to sort a doubly link list
algo must be time as well as memory effective

Jul 21 '07 #1
3 1705
ravi wrote:
>
Can any body tell me an effective algo to sort a doubly link list
algo must be time as well as memory effective
Merge sort.

--
pete
Jul 21 '07 #2
On Jul 21, 11:26 am, ravi <dceravigu...@gmail.comwrote:
Can any body tell me an effective algo to sort a doubly link list
algo must be time as well as memory effective
Have you tried the Standard qsort, and measured it to be inadequate
for your setup? Maybe a mergesort or a heapsort might be better?
Jul 21 '07 #3
santosh <sa*********@gmail.comwrites:
On Jul 21, 11:26 am, ravi <dceravigu...@gmail.comwrote:
>Can any body tell me an effective algo to sort a doubly link list
algo must be time as well as memory effective

Have you tried the Standard qsort, and measured it to be inadequate
for your setup?
qsort doesn't work directly on linked lists. It's for arrays.
Maybe a mergesort or a heapsort might be better?
qsort might be implemented as merge sort or heap sort.
--
Ben Pfaff
http://benpfaff.org
Jul 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

270
by: Jatinder | last post by:
I found these questions on a web site and wish to share with all of u out there,Can SomeOne Solve these Porgramming puzzles. Programming Puzzles Some companies certainly ask for these...
4
by: dssuresh6 | last post by:
Whether browsing forward or backward can be done using a singly linked list. Is there any specific case where a doubly linked list is needed? For people who say that singly linked list allows...
8
by: sudhirlko2001 | last post by:
How to swap two nodes of doubly Linklist
5
by: free2cric | last post by:
Hi, how to detect head and tail in cyclic doubly link list ? Thanks, Cric
0
by: drewy2k12 | last post by:
Heres the story, I have to create a doubly linked list for class, and i have no clue on how to do it, i can barely create a single linked list. It has to have both a head and a tail pointer, and...
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...
3
by: maruf.syfullah | last post by:
Consider the following Class definitions: class AClass { int ai1; int ai2; public: CClass* c; AClass(){}
5
by: adam.kleinbaum | last post by:
Hi there, I'm a novice C programmer working with a series of large (30,000 x 30,000) sparse matrices on a Linux system using the GCC compiler. To represent and store these matrices, I'd like to...
4
by: arnuld | last post by:
This program follows from the section 6.5 of K&R2 where authors created a doubly-linked list using a binary-tree based approach. The only thing I have rewritten myself is the getword function. I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.