473,320 Members | 1,949 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,320 software developers and data experts.

Merge sort

What's the difference between merge sort and direct merge sort?
Feb 13 '09 #1
7 3294
My exam is tomorrow, I require immediate assistance in this matter.
Feb 13 '09 #2
JosAH
11,448 Expert 8TB
@curiously enough
You require it? What about Google?

kind regards,

Jos (moderator)

ps. everybody volunteers here; you can't require an immediate answer or assistence no matter how urgent the question might be to you; it isn't urgent to us.
Feb 13 '09 #3
I already know one of them. If the link you gave was merge sort then it's direct merge that I don't understand. Google doesn't seem to have it.
Feb 13 '09 #4
donbock
2,426 Expert 2GB
I'm not familiar with the term "direct merge sort". Perhaps I know it by another name. What do your class notes say about it?
Feb 14 '09 #5
JosAH
11,448 Expert 8TB
@donbock
Read the link: if you can merge two (consecutive) sub-arrays in place, sometimes it's called 'direct merging'. It's a bit of a complicated juggling with the individual elements to accomplish it. The normal merging uses an auxiliary array for the merge.

kind regards,

Jos
Feb 14 '09 #6
@JosAH
So that's the whole difference? Swapping the array elements instead of placing them in another array? Well why didn't you just say so in the first place?
Feb 14 '09 #7
JosAH
11,448 Expert 8TB
@curiously enough
It wasn't urgent to me; the difference is additional memory versus the complexity of the algortithm. It's your assignment so you study it. I'm sure you have a book that discusses the topic.

kind regards,

Jos
Feb 14 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kevin King | last post by:
I have a question about an assignment I have. I need to count the number of comparisons in my merge sort. I know that the function is roughly nlog(n), but I am definately coming up with too many...
1
by: Booser | last post by:
// Merge sort using circular linked list // By Jason Hall <booser108@yahoo.com> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> //#define debug
5
by: uppe | last post by:
Hey everyone, I've just finished my implementation of the merge-sort algorithm in C, and I thought I could ask for some feedback. (One can always improve, they say) Right now, the code sorts...
9
by: rkk | last post by:
Hi, I have written a generic mergesort program which is as below: --------------------------------------------------------- mergesort.h ----------------------- void MergeSort(void...
13
by: ralphedge | last post by:
These sorts work fine on 100000 ints but if I go much higher they will both segmentation fault **************************MERGESORT********************* mergesort(int *a, int size) //a is...
7
by: Zeba | last post by:
Hi, I have to write program in C# to merge sort a linked list (doubly linked). Is it true that the best way to do it is copy it into an array, sort it and then convert back ? I'm new to C#,...
16
by: Sam Durai | last post by:
Hello, I need to merge a small table (of rows less than 100,sometimes even 0 rows) to a big table (of rows around 4 billion). I used the PK of the big table as merge key but merge does a table scan...
2
by: mqueene7 | last post by:
below is my code for my merge sort but I can't get it to sort properly. I am trying generate random numbers based on input from the user and then sort those random numbers. Can you tell me what I...
5
by: Sarahger9 | last post by:
I am trying to generate a random vector of integers and sort them using merge sort. I am having trouble with the code. It is long, but I would appreciate if someone could take a look at it and see...
9
by: Aaron Watters | last post by:
....is to forget they are sorted??? While trying to optimize some NUCULAR libraries I discovered that the best way to merge 2 sorted lists together into a new sorted list is to just append them...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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

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.