Merge sort

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • curiously enough
    New Member
    • Aug 2008
    • 79

    Merge sort

    What's the difference between merge sort and direct merge sort?
  • curiously enough
    New Member
    • Aug 2008
    • 79

    #2
    My exam is tomorrow, I require immediate assistance in this matter.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by curiously enough
      My exam is tomorrow, I require immediate assistance in this matter.
      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.

      Comment

      • curiously enough
        New Member
        • Aug 2008
        • 79

        #4
        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.

        Comment

        • donbock
          Recognized Expert Top Contributor
          • Mar 2008
          • 2427

          #5
          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?

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by donbock
            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?
            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

            Comment

            • curiously enough
              New Member
              • Aug 2008
              • 79

              #7
              Originally posted by JosAH
              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
              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?

              Comment

              • JosAH
                Recognized Expert MVP
                • Mar 2007
                • 11453

                #8
                Originally posted by curiously enough
                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?
                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

                Comment

                Working...